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

Dropdown: optionValue returns null when select an item from keyboard #6803

Closed
ws-ksda opened this issue Jun 28, 2024 · 3 comments
Closed

Dropdown: optionValue returns null when select an item from keyboard #6803

ws-ksda opened this issue Jun 28, 2024 · 3 comments
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@ws-ksda
Copy link

ws-ksda commented Jun 28, 2024

Describe the bug

With optionValue property the item selected from keyboard does not appear on dropdown label, the onChange returns null.

Reproducer

https://stackblitz.com/edit/1yfam4?file=src%2FApp.tsx

PrimeReact version

latest

React version

18.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

PrimeReact.Demo.-.StackBlitz.mp4

Expected behavior

On Primereact 10.3.1 it works.

@ws-ksda ws-ksda added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 28, 2024
@sja-cslab
Copy link
Contributor

sja-cslab commented Jun 28, 2024

As info - if you rename .code to .value and remove that optionValue="code" it will work. In case you need an asap fix.

We got this already at #6316

@melloware
Copy link
Member

This was fixed in 10.6.4 and 10.6.6. is the latest? @ws-ksda can you confirm?

@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 28, 2024
@ws-ksda
Copy link
Author

ws-ksda commented Jun 28, 2024

Yes, it is latest. Look package.json stackblitz:

https://stackblitz.com/edit/1yfam4?file=src%2FApp.tsx,package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

3 participants