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

MultiSelect: error when selecting option with null value #1446

Closed
VsevolodGolovanov opened this issue Jul 10, 2020 · 1 comment
Closed

MultiSelect: error when selecting option with null value #1446

VsevolodGolovanov opened this issue Jul 10, 2020 · 1 comment
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@VsevolodGolovanov
Copy link

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/romantic-poincare-s7lik

Current behavior
Selecting an option with null value results in error.

Expected behavior
Selecting an option with null value should work fine (it even already works with undefined).

Minimal reproduction of the problem with instructions
Open codesandbox, select "Null" in the MultiSelect.

Please tell us about your environment:

  • React version:
  • PrimeReact version:
    4.2.2

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
@VsevolodGolovanov
Copy link
Author

VsevolodGolovanov commented Jul 10, 2020

Actually it doesn't work right with undefined as well. onChange e.value supplies the option object itself instead of option.value (=== undefined). Maybe that's fine, but null should probably be supported.

sixhellstations added a commit to sixhellstations/primereact that referenced this issue Jul 15, 2020
This reverts commit bcc2082.
@mertsincan mertsincan self-assigned this Sep 19, 2020
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Sep 19, 2020
@mertsincan mertsincan added this to the 5.0.0.Final milestone Sep 19, 2020
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

2 participants