-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Dropdown: Loses value if value changed via ENTER key #6058
Dropdown: Loses value if value changed via ENTER key #6058
Comments
Similar to: #6035 Probably a similar fix is needed. |
Got the same issue. Seems to be that getOptionValue is called twice, where the result of the first is passed to the second. Causing it to not find the value. Call stack: |
@melloware seems not to be similar. |
…6703) * Fix: Remove setTokens in onPaste on InputOtp to avoid duplicate values - When pasted the value into InputOtp, was duplicating the value, as the state was updated in onPaste and onInput * Update InputOtp.js * Fix #6058 Dropdown: Select value with Enter when optionValue is set --------- Co-authored-by: Datacamp <[email protected]> Co-authored-by: Melloware <[email protected]> Co-authored-by: Gabriell Reis Alvarenga <[email protected]>
Reverting this change. |
Describe the bug
Dropdown is empty as onChange event value property gets undefined if Dropdown has optionValue set.
Note:
In the stackblitz I created two dropdowns. One with optionValue and one without. The one without is working as expected.
Reproducer
https://stackblitz.com/edit/vitejs-vite-tawz4r?file=src%2FApp.tsx
PrimeReact version
10.5.1
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 121
Steps to reproduce the behavior
Expected behavior
After pressing ENTER value change should be reflected.
The text was updated successfully, but these errors were encountered: