From 9e32e6ed97804575fb320ee47eec1a4b23b2cf3e Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 12 Dec 2024 13:18:45 +0100 Subject: [PATCH] added id for keeping the selection fixes: #35863 Signed-off-by: Erik Jan de Wit --- .../src/components/role-mapping/RoleMapping.tsx | 10 ++++++++++ 1 file changed, 10 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 9b299fb72d89..11f5d3b16c76 100644 --- a/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx +++ b/js/apps/admin-ui/src/components/role-mapping/RoleMapping.tsx @@ -43,6 +43,7 @@ export const mapRoles = ( ) => [ ...(hide ? assignedRoles.map((row) => ({ + id: row.role.id, ...row, role: { ...row.role, @@ -50,6 +51,7 @@ export const mapRoles = ( }, })) : effectiveRoles.map((row) => ({ + id: row.role.id, ...row, role: { ...row.role, @@ -141,6 +143,14 @@ export const RoleMapping = ({ ) .flat(); + const test = [ + ...mapRoles( + [...clientMapping, ...realmRolesMapping], + [...effectiveClientRoles, ...effectiveRoles], + hide, + ), + ]; + console.log(test); return [ ...mapRoles( [...clientMapping, ...realmRolesMapping],