AddPermission: Prevent page reload (#81324)

This commit is contained in:
Alex Khomenko 2024-01-26 08:38:12 +01:00 committed by GitHub
parent 0f3606f3f5
commit a10c577f52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,13 @@ export const AddPermission = ({
<CloseButton onClick={onCancel} />
<h5>{title}</h5>
<form name="addPermission" onSubmit={() => onAdd({ userId, teamId, builtInRole, permission, target })}>
<form
name="addPermission"
onSubmit={(event) => {
event.preventDefault();
onAdd({ userId, teamId, builtInRole, permission, target });
}}
>
<Stack gap={1} direction="row">
<Select
aria-label="Role to add new permission to"