Skip to content

Commit

Permalink
disable add user button if no roles selected
Browse files Browse the repository at this point in the history
  • Loading branch information
mgtennant committed Jun 21, 2024
1 parent 551399d commit 607098e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/modal/admin/AddRoles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const AddRoles = ({
variant="contained"
color="primary"
onClick={addRolesHandler}
disabled={loading || !userObject}
disabled={loading || !userObject || rolesToAdd.length === 0}
style={{ marginLeft: '8px' }}
>
{loading ? <CircularProgress size={24} /> : 'Add Roles'}
Expand Down

0 comments on commit 607098e

Please sign in to comment.