refresh realm after being changed (#32954)

fixes: #32834

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-09-16 14:50:43 +02:00 committed by GitHub
parent 5e65bdde16
commit d1f141148a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,7 +49,7 @@ export const EventsTab = ({ realm }: EventsTabProps) => {
const [addEventType, setAddEventType] = useState(false);
const { addAlert, addError } = useAlerts();
const { realm: realmName } = useRealm();
const { realm: realmName, refresh: refreshRealm } = useRealm();
const setupForm = (eventConfig?: EventsConfigForm) => {
setEvents(eventConfig);
@ -111,6 +111,7 @@ export const EventsTab = ({ realm }: EventsTabProps) => {
},
);
}
refreshRealm();
try {
await adminClient.realms.updateConfigEvents(