admin管理员组

文章数量:1391929

I need that the parents and children nodes can be checked independently. For instance, if my tree has one node with child, the portment is:

If I check this child, automatically the parent will be checked too, or vice versa. I wanna can check a child or parent and do not change the other.

How can I "remove" this dependency of both?

Any help is appreciated.

Thank advance!

I need that the parents and children nodes can be checked independently. For instance, if my tree has one node with child, the portment is:

If I check this child, automatically the parent will be checked too, or vice versa. I wanna can check a child or parent and do not change the other.

How can I "remove" this dependency of both?

Any help is appreciated.

Thank advance!

Share Improve this question edited Aug 26, 2014 at 2:52 fdam asked Dec 3, 2013 at 19:22 fdamfdam 8301 gold badge12 silver badges26 bronze badges 2
  • Can we what you've done so far? Like some code. – dcodesmith Commented Dec 3, 2013 at 19:35
  • hi @dcodesmith, I solved my question putting the option "two_state" : true.. thanks =) – fdam Commented Dec 3, 2013 at 19:43
Add a ment  | 

1 Answer 1

Reset to default 6

I found the answer for my question in own jstree site:

link

two_state A boolean. Default is false. If set to true checkboxes will be two-state only, meaning that you will be able to select parent and children independently and there will be no undetermined state.

So, I solved my question putting the option below:

"checkbox" : { 
    "two_state" : true
}

Att

本文标签: javascriptHow can I quotcheckuncheckquot nodes quotchildparentquot independently in JSTreeStack Overflow