reset selected after action (#30001)

fixes: #29981

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-06-03 17:53:34 +02:00 committed by GitHub
parent 0d2adbb75d
commit 56c955df20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -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);

View file

@ -117,6 +117,7 @@ export const UserGroups = ({ user }: UserGroupsProps) => {
),
);
setSelectedGroups([]);
addAlert(t("removedGroupMembership"), AlertVariant.success);
} catch (error) {
addError("removedGroupMembershipError", error);