Skip to content

Commit

Permalink
fix: context menu in data browser is not scrollable (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
dblythy committed Sep 19, 2022
1 parent c854f02 commit 6c54bd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ContextMenu/ContextMenu.react.js
Expand Up @@ -14,7 +14,7 @@ const getPositionToFitVisibleScreen = (ref) => {

const elBox = ref.current.getBoundingClientRect();
const y = (elBox.y + elBox.height) < window.innerHeight ?
0 : (window.innerHeight - (elBox.y + elBox.height));
0 : (0 - elBox.y + 100);

// If there's a previous element show current next to it.
// Try on right side first, then on left if there's no place.
Expand Down Expand Up @@ -45,6 +45,8 @@ const MenuSection = ({ level, items, path, setPath, hide }) => {
const style = position ? {
left: position.x,
top: position.y,
maxHeight: '80vh',
overflowY: 'scroll',
opacity: 1
} : {};

Expand Down

0 comments on commit 6c54bd8

Please sign in to comment.