[v10.1.x] Auth: Fix set basicrole to the previous role in UI on error from backend (#74409)

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
(cherry picked from commit 87e8b654a2)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2023-09-05 19:09:36 +01:00
committed by GitHub
co-authored by Eric Leijonmarck
parent 01d039b9aa
commit a587af2c92
@@ -51,7 +51,7 @@ export const RolePicker = ({
useEffect(() => {
setSelectedBuiltInRole(basicRole);
setSelectedRoles(appliedRoles);
}, [appliedRoles, basicRole]);
}, [appliedRoles, basicRole, onBasicRoleChange]);
useEffect(() => {
const dimensions = ref?.current?.getBoundingClientRect();