fixed disabling unassign on cancel (#26693)

Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
agagancarczyk 2024-02-01 14:21:55 +00:00 committed by GitHub
parent d40690bd40
commit 1fe103f260
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,6 +144,10 @@ export const RoleMapping = ({
messageKey: t("removeMappingConfirm", { count: selected.length }),
continueButtonLabel: "remove",
continueButtonVariant: ButtonVariant.danger,
onCancel: () => {
setSelected([]);
refresh();
},
onConfirm: async () => {
try {
await Promise.all(deleteMapping(type, id, selected));