Skip to content

Commit

Permalink
fix(user management): fix disable button state when deselect all cheb…
Browse files Browse the repository at this point in the history
…oxes
  • Loading branch information
saadanzari committed Jul 12, 2024
1 parent 8bf7a85 commit 6216c0f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/overlays/EditPortalRoles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ export default function EditPortalRoles({ id }: { id: string }) {
}

const checkConfirmButton = () =>
assignedRoles &&
selectedRoles &&
assignedRoles.length === selectedRoles.length &&
assignedRoles.every((value) => selectedRoles.includes(value))
selectedRoles.length === 0 ||
(assignedRoles &&
selectedRoles &&
assignedRoles.length === selectedRoles.length &&
assignedRoles.every((value) => selectedRoles.includes(value)))

return (
<>
Expand Down

0 comments on commit 6216c0f

Please sign in to comment.