Skip to content

fix: context menu in data browser is not scrollable #2271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/ContextMenu/ContextMenu.react.js
Original file line number Diff line number Diff line change
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