Skip to content
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

Fixed dropdown appearing over sidebar #599

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 2 additions & 1 deletion mathesar_ui/src/sections/left-pane/LeftPane.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ aside {
bottom: 0;
border-right: 1px solid #dfdfdf;
transition: left .2s ease-out;
z-index: 3;
z-index: 101;
background-color: white;
Comment on lines +8 to +9
Copy link
Member

@pavish pavish Aug 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a higher z-index to the left pane would fix this issue but would introduce other issues such as the dropdowns in header (schema selection dropdown) would be positioned behind the left pane.

This issue is a side-effect of the dropdown attaching by default to the body. This ensures it always appears over other elements.

There are two ways, this can be resolved:

  1. For this particular case, the dropdown can be attached to the table wrapper or the header element. We can specify the parent (header) as reference to the portal action. This has to be passed down to the dropdown and then to the portal action.
  2. The simpler approach, which I recommend: Hide the dropdown when column header is not visible. It can be done using css. Refer: https://popper.js.org/docs/v2/modifiers/hide/

Either of these approaches should only be applied on the column dropdowns, and not commonly to the dropdown component.

@asharonbaltazar Please let me know if you'd like to/have time to resolve this. If not, we can close the PR, and come back to it later.

overflow-y: auto;

nav {
Expand Down