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 value doesn't reflect the underlying select element value #3089

Open
nauvalazhar opened this issue Aug 28, 2024 · 0 comments
Open

Select value doesn't reflect the underlying select element value #3089

nauvalazhar opened this issue Aug 28, 2024 · 0 comments

Comments

@nauvalazhar
Copy link

Bug report

Current Behavior

Hi, I encountered a problem with the Select primitive when resetting the form, the underlying native <select> element value got reset but the value on the Select component preserves the old value.

Expected behavior

The internal Select component value should reflect the underlying <select> element value.

Reproducible example

CodeSandbox

Step to reproduce:

  1. Select the second option (b) and click submit
  2. It will then display the value on the console and reset the form
  3. Click the submit again, and the console will print the a value while the Select component still shows the b option

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-select 2.1.1
React n/a 18.2.0
Browser
Assistive tech
Node n/a
npm/yarn
Operating System
lbrooks added a commit to lbrooks/Bazecor that referenced this issue Oct 11, 2024
Wrong selection could still occur by the following steps:
1) Select a key that does NOT have a Superkey/Macro
2) Assign a Superkey/Macro
3) Click another key which does NOT have a Superkey/Macro assigned.
Error: The Superkey/Macro set on the previous key is still selected.

Maybe related to: radix-ui/primitives#3089

Signed-off-by: Lawrence Brooks <[email protected]>
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

1 participant