mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GrafanaUI: Make sure ContextMenu does not get cut off at the top (#77435)
This commit is contained in:
parent
6c6c54637f
commit
f42bb86667
@ -39,7 +39,7 @@ export const ContextMenu = React.memo(
|
|||||||
setPositionStyles({
|
setPositionStyles({
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
left: collisions.right ? x - rect.width - OFFSET : x - OFFSET,
|
left: collisions.right ? x - rect.width - OFFSET : x - OFFSET,
|
||||||
top: collisions.bottom ? y - rect.height - OFFSET : y + OFFSET,
|
top: Math.max(0, collisions.bottom ? y - rect.height - OFFSET : y + OFFSET),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [x, y]);
|
}, [x, y]);
|
||||||
|
Loading…
Reference in New Issue
Block a user