mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
RolePicker: Add extra offset for menu position (#49823)
This commit is contained in:
parent
d078cb8c78
commit
a71e371877
@ -53,7 +53,7 @@ export const RolePicker = ({
|
||||
const { bottom, top } = dimensions;
|
||||
const distance = window.innerHeight - bottom;
|
||||
const offset = bottom - top + 10; // Add extra 10px to offset to account for border and outline
|
||||
if (distance < MENU_MAX_HEIGHT) {
|
||||
if (distance < MENU_MAX_HEIGHT + 20) {
|
||||
setOffset(offset);
|
||||
} else {
|
||||
setOffset(-offset);
|
||||
|
Loading…
Reference in New Issue
Block a user