-
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: Issue on selecting option using keyboard up/down/enter key when optionValue is provided. #6316
Closed
pradipjs opened this issue
Apr 6, 2024
· 4 comments
· Fixed by #6374, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Closed
Dropdown: Issue on selecting option using keyboard up/down/enter key when optionValue is provided. #6316
pradipjs opened this issue
Apr 6, 2024
· 4 comments
· Fixed by #6374, leoo1992/GeradorQRCode#23 or leoo1992/GeradorQRCode#27
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
Comments
pradipjs
added
the
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
label
Apr 6, 2024
melloware
added
Component: Accessibility
Issue or pull request is related to WCAG or ARIA
Status: Needs Reproducer
Issue needs a runnable reproducer
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Component: Accessibility
Issue or pull request is related to WCAG or ARIA
labels
Apr 6, 2024
Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days. |
I have updated the query with reproduce steps. |
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Reproducer
Issue needs a runnable reproducer
labels
Apr 9, 2024
Thanks changed it to "Bug" |
shubhsaur
pushed a commit
to shubhsaur/primereact
that referenced
this issue
Apr 10, 2024
…n using optionValue prop
Hello @melloware, have submitted the PR for this issue |
melloware
pushed a commit
to shubhsaur/primereact
that referenced
this issue
Apr 13, 2024
…n using optionValue prop
melloware
added a commit
that referenced
this issue
Apr 13, 2024
…tionValue prop (#6374) * Fix #6316: fixed issue on selecting option by key event when using optionValue prop * Update Dropdown.js --------- Co-authored-by: Shubham Saurabh <[email protected]> Co-authored-by: Melloware <[email protected]>
This was referenced May 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
event.option is the value of the option. If we try to get the lable using just a value, it returns null and resets the dropdown to empty.
I think it should have whole option and in "if" condition we should match it using the getOptionValue function by passing the option. That would do the job.
Reproducer
https://stackblitz.com/edit/c8zt2t-9ncxnp?file=src%2FApp.jsx
PrimeReact version
10.6.2
React version
18.x
Language
TypeScript
Build / Runtime
Next.js
Browser(s)
Any
Steps to reproduce the behavior
Simple dropdown with optionValue parameter set.
Try to set value using. the keyboard, on foucs, press enter/tab to open the options. up/down arrow to move & enter to select the option.
Replication video : https://www.awesomescreenshot.com/video/26486438?key=8665b08a05cbc1611bbec00e4273ecb6
Expected behavior
It should select the option. It is currently resetting the dropdown.
The text was updated successfully, but these errors were encountered: