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

ListBox, Dropdown: Using non-unique key #1397

Closed
sixhellstations opened this issue Jun 8, 2020 · 1 comment · Fixed by #1401
Closed

ListBox, Dropdown: Using non-unique key #1397

sixhellstations opened this issue Jun 8, 2020 · 1 comment · Fixed by #1401
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@sixhellstations
Copy link
Contributor

I'm submitting a bug report

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/primereact-test-6mz11

Current behavior
When mapping items ListBox use option.label as key, which possibly can be duplicate

Expected behavior
Use unique keys

  • React version:
    16.13.1

  • PrimeReact version:
    4.2.1

  • Browser:
    all

  • Language:
    all

@sixhellstations
Copy link
Contributor Author

Same issue in dropdown component

@sixhellstations sixhellstations changed the title ListBox.js: Using possibly non-unique key ListBox, Dropdown: Using non-unique key Jun 10, 2020
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Jun 24, 2020
@mertsincan mertsincan added this to the 5.0 milestone Jun 24, 2020
mertsincan added a commit that referenced this issue Jun 24, 2020
Fixed #1397 - duplicate key error in listbox and dropdown
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