From 56c955df205a92f746bdfea80b18839293c6b833 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 3 Jun 2024 17:53:34 +0200 Subject: [PATCH] reset selected after action (#30001) fixes: #29981 Signed-off-by: Erik Jan de Wit --- js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx | 1 + js/apps/admin-ui/src/user/UserGroups.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx b/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx index 5b8172f6ad..22743412e6 100644 --- a/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx +++ b/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx @@ -154,6 +154,7 @@ export const RoleMapping = ({ try { await Promise.all(deleteMapping(adminClient, type, id, selected)); addAlert(t("clientScopeRemoveSuccess"), AlertVariant.success); + setSelected([]); refresh(); } catch (error) { addError("clientScopeRemoveError", error); diff --git a/js/apps/admin-ui/src/user/UserGroups.tsx b/js/apps/admin-ui/src/user/UserGroups.tsx index c947f93b0f..676394af63 100644 --- a/js/apps/admin-ui/src/user/UserGroups.tsx +++ b/js/apps/admin-ui/src/user/UserGroups.tsx @@ -117,6 +117,7 @@ export const UserGroups = ({ user }: UserGroupsProps) => { ), ); + setSelectedGroups([]); addAlert(t("removedGroupMembership"), AlertVariant.success); } catch (error) { addError("removedGroupMembershipError", error);