Open ForbiddenEra opened 5 months ago
I had the same problem. I was able to resolve it by directly calling the setValues function from loaded when creating the Tree structure. Additionally, I set the status to 2 during creation. This method fixed the toggle issue of checked.
Hi,
If your tree array is as such:
Then no nodes are selected. This is because the
checked
must be implemented as a toggle of sorts, inverting the previous value, so because the parent is checked, settingchecked: true
on a child causes the parent to be inverted, unchecking it and seemingly also unchecking the child.This doesn't make intuitive sense and it took me a good few minutes to figure out what was going on in this case.
Because of this, you either need to set
checked: true
on the most-parent node that you want all children checked in, or, if you don't want all that parent's children checked, then you need to not have the property on the parent and only on the child nodes you want checked.checked: true
should mean I want that entry checked, regardless of any previous values; there should be no inversion toggling.