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

Tabs: Menu like Select or FilterableSelect stays open when the tab is changed #3833

Closed
konrazem opened this issue Mar 17, 2021 · 3 comments · Fixed by #3877
Closed

Tabs: Menu like Select or FilterableSelect stays open when the tab is changed #3833

konrazem opened this issue Mar 17, 2021 · 3 comments · Fixed by #3877

Comments

@konrazem
Copy link

Current behaviour

Menu like Select or FilterableSelect stays open when the tab is changed

Expected behaviour

Menu should be closed when I change the tab

Reproducible example

https://codesandbox.io/s/dazzling-roentgen-snkff?fontsize=14&hidenavigation=1&theme=dark

Suggested solution(s)

Set z-index for each tab content or reset components states on tab change (?)

Additional context

I think workaround would be to handle the states of those components by setState method, by the programmer and not by Tabs component. However I do not see any method like onChange for Tabs component.
https://github.com/Sage/carbon/blob/master/src/components/tabs/tabs.component.js

Your environment

Software Version(s)
carbon-react 68.0.2
carbon-factory 11.0.1
react-scripts
React 16.13.1
Browser Chrome
npm 6.14.8
Operating System Windows 10
@konrazem konrazem added Bug triage Triage Required labels Mar 17, 2021
@samtjo
Copy link
Contributor

samtjo commented Mar 18, 2021

Hi @konrazem - thanks for raising this. To fix it you can simply add the disablePortal prop to FilterableSelect

This could also be a bug however, I would expect this select dropdown to close when it loses focus, I will add it to our backlog to look into

@samtjo
Copy link
Contributor

samtjo commented Mar 18, 2021

FE-3965

@carbonci
Copy link
Collaborator

🎉 This issue has been resolved in version 68.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

3 participants