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

How to just get the name top level checked box #324

Open
yunusyavuz16 opened this issue Feb 27, 2022 · 5 comments
Open

How to just get the name top level checked box #324

yunusyavuz16 opened this issue Feb 27, 2022 · 5 comments
Labels

Comments

@yunusyavuz16
Copy link

yunusyavuz16 commented Feb 27, 2022

Hello,
first of all, thank you for creating this library.
I could not find somethin. I have treeview data like

Level1

Level2

Level3

Level4

in that way, when I checked Level 1 the checked property turns out the level4 but it does not give me the level 1 object I have to just display the name of the top object which is checked. In this example that is level 1. How can I obtain just checked box in top or just checked box name which I clicked. If there is an issue about this subject I am sorry I could not find it. Please help me :)
Kind regards.

@yunusyavuz16
Copy link
Author

Could you please help someone how can I keep the state of box which is checked in Level 1 or Level 2? library always gives me the level 4 state.

@yunusyavuz16
Copy link
Author

@jakezatecky I am in the troulbe I hope I dont bother you can you help me?

@JeeremB
Copy link

JeeremB commented Mar 4, 2022

Same issue here !

@SamdaniAnik
Copy link

@yunusyavuz16 You have to store checked data in a temporary array. Then you have to take the difference of checked and temp array and push the difference into temp array. You will get your desired value.

@jakezatecky
Copy link
Owner

You could set checkModel="all", which will report all of the checked nodes and not just the leaf nodes. This would include "Level 1" in the selected array, assuming that Level 2 and Level 3 each have just one child below and those are all selected, too.

There is no support for checkModel="top" yet, but that is an on-going enhancement.

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

4 participants