Auth: Fix set basicrole to the previous role in UI on error from backend (#74395)

fix: onchange effect to set basicrole when error from backend
This commit is contained in:
Eric Leijonmarck 2023-09-05 18:44:57 +01:00 committed by GitHub
parent fa229661e8
commit 87e8b654a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ export const RolePicker = ({
useEffect(() => {
setSelectedBuiltInRole(basicRole);
setSelectedRoles(appliedRoles);
}, [appliedRoles, basicRole]);
}, [appliedRoles, basicRole, onBasicRoleChange]);
useEffect(() => {
const dimensions = ref?.current?.getBoundingClientRect();