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

[Select] non-option children are selectable if they're the first child of the Select #26149

Closed
narsiliko opened this issue May 5, 2021 · 5 comments
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!

Comments

@narsiliko
Copy link

narsiliko commented May 5, 2021

When I add several ListSubheader components into Select and then click on the first one - Select prints console warnings.

The bug is reproduced here:
https://codesandbox.io/s/select-1st-child-no-option-bl85u

  1. Open the select
  2. Click on Subheader 1
  3. Look into the console

Expected behavior:
Nothing should happen, when I`m clicking on any ListSubheader

@narsiliko narsiliko added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 5, 2021
@oliviertassinari
Copy link
Member

It looks close to #25567.

@oliviertassinari oliviertassinari added the component: select This is the name of the generic UI component, not the React module! label May 5, 2021
@jsheffers
Copy link

jsheffers commented May 10, 2021

Changing the default "age" value from a string to an integer 10 for example fixes this issue.

@narsiliko
Copy link
Author

Changing the default "age" value from a string to an integer 10 for example fixes this issue.

But if I change options values from numbers to strings, the error persists.

@eps1lon eps1lon changed the title Select component crashes when a several ListSubheader components inside it, and user user clicking the first one [Select] non-option children are selectable if they're the first child of the Select Jul 13, 2021
@eps1lon eps1lon added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 13, 2021
@eps1lon
Copy link
Member

eps1lon commented Jul 13, 2021

It looks close to #25567.

Problem still persists when the first child is not an option: https://codesandbox.io/s/select-1st-child-no-option-bl85u

@eps1lon
Copy link
Member

eps1lon commented Jul 13, 2021

Closing in favor of #26790

@eps1lon eps1lon closed this as completed Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

4 participants