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

PickList: Behavior when using spread syntax in onChange #5739

Closed
kl-nevermore opened this issue Jan 11, 2024 · 0 comments · Fixed by #5737
Closed

PickList: Behavior when using spread syntax in onChange #5739

kl-nevermore opened this issue Jan 11, 2024 · 0 comments · Fixed by #5737
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@kl-nevermore
Copy link
Contributor

Describe the bug

from #4089

When updating state using spread syntax with the value of [event.value] passed when the onChange event of PickList fired, the following bug occurs.

Focus is lost when selecting.
When the down arrow is pressed continuously, "undefined" is stored in the array and becomes an invalid value.

Reproducer

https://stackblitz.com/edit/vpjgjp?file=src%2FApp.jsx

Reproducer

https://stackblitz.com/edit/vpjgjp?file=src%2FApp.jsx

PrimeReact version

10.3.1

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@kl-nevermore kl-nevermore added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 11, 2024
@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 Jan 11, 2024
@melloware melloware added this to the 10.4.0 milestone Jan 11, 2024
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

Successfully merging a pull request may close this issue.

2 participants