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

Fixed dropdown appearing over sidebar #599

wants to merge 2 commits into from

Conversation

asharonbaltazar
Copy link
Contributor

Fixes #594

It adds styling to give the sidebar a higher z-index and a white background-color, thus allowing it to appear over the dropdown.

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the master branch of the repository
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Comment on lines +8 to +9
z-index: 101;
background-color: white;
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

CellHeader dropdown floats above the sidebar
2 participants