Fix User Event Types not visible when 'Save events disabled` (#20581)

Fixes #20503
This commit is contained in:
Stan Silvert 2023-05-30 06:36:46 -04:00 committed by GitHub
parent 1b06c4cf6c
commit 88bb5977cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,14 +195,13 @@ export const EventsTab = ({ realm }: EventsTabProps) => {
/>
</FormAccess>
</PageSection>
{events?.eventsEnabled && (
<PageSection>
<EventsTypeTable
key={tableKey}
addTypes={() => setAddEventType(true)}
eventTypes={events.enabledEventTypes || []}
eventTypes={events?.enabledEventTypes || []}
onDelete={(value) => {
const enabledEventTypes = events.enabledEventTypes?.filter(
const enabledEventTypes = events?.enabledEventTypes?.filter(
(e) => e !== value.id
);
addEvents(enabledEventTypes);
@ -210,7 +209,6 @@ export const EventsTab = ({ realm }: EventsTabProps) => {
}}
/>
</PageSection>
)}
</Tab>
<Tab
eventKey="admin"