Fix User Event Types not visible when 'Save events disabled` (#20581)
Fixes #20503
This commit is contained in:
parent
1b06c4cf6c
commit
88bb5977cd
1 changed files with 14 additions and 16 deletions
|
@ -195,22 +195,20 @@ export const EventsTab = ({ realm }: EventsTabProps) => {
|
|||
/>
|
||||
</FormAccess>
|
||||
</PageSection>
|
||||
{events?.eventsEnabled && (
|
||||
<PageSection>
|
||||
<EventsTypeTable
|
||||
key={tableKey}
|
||||
addTypes={() => setAddEventType(true)}
|
||||
eventTypes={events.enabledEventTypes || []}
|
||||
onDelete={(value) => {
|
||||
const enabledEventTypes = events.enabledEventTypes?.filter(
|
||||
(e) => e !== value.id
|
||||
);
|
||||
addEvents(enabledEventTypes);
|
||||
setEvents({ ...events, enabledEventTypes });
|
||||
}}
|
||||
/>
|
||||
</PageSection>
|
||||
)}
|
||||
<PageSection>
|
||||
<EventsTypeTable
|
||||
key={tableKey}
|
||||
addTypes={() => setAddEventType(true)}
|
||||
eventTypes={events?.enabledEventTypes || []}
|
||||
onDelete={(value) => {
|
||||
const enabledEventTypes = events?.enabledEventTypes?.filter(
|
||||
(e) => e !== value.id
|
||||
);
|
||||
addEvents(enabledEventTypes);
|
||||
setEvents({ ...events, enabledEventTypes });
|
||||
}}
|
||||
/>
|
||||
</PageSection>
|
||||
</Tab>
|
||||
<Tab
|
||||
eventKey="admin"
|
||||
|
|
Loading…
Reference in a new issue