Fix RolePicker component offset when it has too many roles (#62857)

Fix role picker offset with too many roles
This commit is contained in:
linoman 2023-02-08 12:09:27 +01:00 committed by GitHub
parent 25756b49a3
commit bc67edbff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,9 @@ export const RolePicker = ({
let vertical = -offsetVertical;
if (distance < MENU_MAX_HEIGHT + 20) {
vertical = offsetVertical;
// Off set to display the role picker menu at the bottom of the screen
// without resorting to scroll the page
vertical = 50 + (MENU_MAX_HEIGHT - distance) - offsetVertical;
}
/*