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

Duplicate value detected starting from version 1.7.3 #371

Open
SergioArrighi opened this issue Aug 8, 2022 · 2 comments
Open

Duplicate value detected starting from version 1.7.3 #371

SergioArrighi opened this issue Aug 8, 2022 · 2 comments

Comments

@SergioArrighi
Copy link

Describe the bug
Upgraded from version 1.6.0 to version 1.7.3.
My data set contains some leaf nodes with duplicate value.
This was working perfectly fine in 1.6.0 with the tree showing no clue of issues.

Reproduction steps
Please include the necessary steps to reproduce the issue as well as a live example that showcases it. You can modify this CodeSandbox reference point to create a working example.
Create a data source with nodes having non-unique values.
Feed it to CheckboxTree element

Expected behavior
Please include a clear and concise description of what you expected to happen.
Tree is displayed

Screenshots
Javascript error
message: "Duplicate value '/BLR1/05_BT_AY_Domestic-RT.postman_collection.json/05_Get Cart' detected.

@jakezatecky
Copy link
Owner

Unfortunately, it was never intended to allow duplicate values, as this component makes an assumption that each node has a different value. While allowing duplicate values could be seen as a feature in some use cases and contexts, in most scenarios it should be considered an issue.

I suppose the component could have another property, say allowDuplicateValues, that would allow the behavior you relied upon in the older version, but admittedly that is not high priority right now.

@SergioArrighi
Copy link
Author

SergioArrighi commented Nov 2, 2022

Hello,
I would like to +1 this one and challenge the fact that it is considered an enhancement.
Actually being a change released in the same major, this one should be considered a regression as it contains non backward compatible changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants