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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot explicitly set zIndex for MenuList #3213

Closed
martinpengellyphillips opened this issue Jan 30, 2021 · 2 comments
Closed

Cannot explicitly set zIndex for MenuList #3213

martinpengellyphillips opened this issue Jan 30, 2021 · 2 comments

Comments

@martinpengellyphillips
Copy link

馃悰 Bug report

I need to explicitly set zIndex on MenuList to overcome an ordering issue in my application. Currently it seems that any passed zIndex has no effect as it is not passed to the wrapping popper element. This is similar to #2928 - however, in my case using Portal is not an option at present due to #3201.

In the below image, zIndex={4} was passed to MenuList.

chakra-zindex-menulist-bug

馃捇 Link to reproduction

See prior https://codesandbox.io/s/elastic-jones-monv9

馃 Expected behavior

zIndex is set on the corresponding popper element when passed as a prop to MenuList.

@segunadebayo
Copy link
Member

Resolved in #3210, now available in the latest version

@kennycrosby
Copy link

@segunadebayo this is fixed if a user explicitly adds the zIndex as a prop to MenuList but adding the zIndex to baseStyle or to a variant does not work. Pointing out that this is also the case with the Tooltip bg, works as an explicitly set prop but NOT as a baseStyle or variant.

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

No branches or pull requests

3 participants