fdam
fdam

Reputation: 830

How can I "check/uncheck" nodes "child/parent" independently in JSTree?

I need that the parents and children nodes can be checked independently. For instance, if my tree has one node with child, the comportment 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!

Upvotes: 3

Views: 5678

Answers (1)

fdam
fdam

Reputation: 830

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

Upvotes: 6

Related Questions