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

[Bug]: option displayed is the default one when default option have the same value as the one selected #841

Open
daymoz opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@daymoz
Copy link

daymoz commented Dec 17, 2024

Bug description

When a default option has the same value has another option that is selected, the default one is displayed instead of the one selected.

This can be encountered when using select as facets and the option values are URL to sort a list. When an option is selected, the page is reload, and the selected option has the same value as the default option so when we click on it removes the facet.

Expected behavior

Even if there are some workarounds for this situation, selected option should take the priority over other options that have the same value and that are not selected.

Steps to reproduce

I have a codesandbox with 4 examples. The n°3 one is my issue.
https://codesandbox.io/p/sandbox/z5x2vf

Additional context

  • Browser [Every browser]
@daymoz daymoz added the bug Something isn't working label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant