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

Unable to get just the checked parent value if all the childrens are selected rather than getting all checked values #404

Open
sagarreddy-gfk opened this issue Jan 25, 2023 · 1 comment
Labels

Comments

@sagarreddy-gfk
Copy link

Hi @jakezatecky ,

If all the childrens are selected, then I just need parent value of it rather than all checked values. Could you please let me know the way to achieve it? because it is a costly request for us as the data is more than 10k. and also if there is a way to select all/unselect all because since the data is huge, iteration would be costly to iterate over all the nodes.

Thanks in advance!

@jakezatecky
Copy link
Owner

At the moment, the CheckboxTree supports either storing all leaf nodes selected (default behavior) or all nodes selected (with checkModel="all". What you describe is not yet supported, where the topmost selections are stored, but it is an enhancement we intend to support.

Unselecting all nodes is as simple as making the checked array empty, but selecting all of them is costly as you note. There is no current way to select all nodes without iterating through them.

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

No branches or pull requests

2 participants