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

Error in ComboBox when an option contains double quotes #480

Open
SreeniIO opened this issue Aug 31, 2024 · 1 comment
Open

Error in ComboBox when an option contains double quotes #480

SreeniIO opened this issue Aug 31, 2024 · 1 comment

Comments

@SreeniIO
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/github-1j1ryx-bz1ymt?file=src%2Froutes%2Findex.tsx
  2. Open the ComboBox
  3. Hover on an option with double quotes
  4. Error "Failed to execute 'querySelector' on 'Element': '[data-key="Blue"berry""]' is not a valid selector." is thrown

Expected behavior
Values with double quote should not cause an error

@SreeniIO SreeniIO mentioned this issue Aug 31, 2024
@derekrjones
Copy link

derekrjones commented Jan 14, 2025

My workaround has been to use optionValue={CSS.escape}, and this works for most use cases. Though I guess it won't work for form submissions. (or other cases??)
So still a bug that needs fixing.

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

Successfully merging a pull request may close this issue.

2 participants