Skip to content

Commit

Permalink
fix: User role edit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed May 2, 2024
1 parent 186d9c1 commit cf4477b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/settings/edit-user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,18 @@ export default function EditUser() {
: r
)
)
// Fell to async state trap
field.onChange(
roles
.filter((r) => !r.selected)
.map((r) =>
r.id === role.id
? {
...r,
selected: e as boolean,
}
: r
)
.filter((r) => r.selected)
.map((r) => r.id)
)
}}
Expand Down

0 comments on commit cf4477b

Please sign in to comment.