Tree, threeState and disabled node

Hi webix community !

In a treeState enabled tree, if i click on a parent node having some disabled childs, disabled childs are checked and getChecked() return also disabled nodes, because a disabled node is checked when clicking on the parent node. Is it expected or is it a bug ?

My work around to only have non disabled checked nodes: in “onItemCheck” event, loop on checked items and create a new array without disabled items. Note that in my code, unchecking disabled item make the parent node always in the same state (i.e we can no longer check it to enable/disable child nodes). That’s why the unchecking code is commented.

The documentation does not mention any node’s attribute to work around that, so i think that cleaning getChecked() results in the only way. Right ?

Any suggestions ? thank you

Why it should be consider as a bug ? because i can’t check/unchecked a disabled node by clicking on his checkbox. So when clicking checkbox of the parent, disabled childs should NOT be checked.

For the end user (UX), seeing checked disabled nodes make him think they are includes in the selection.

  1. That’s the case, getChecked() return them
  2. User can not uncheck disabled nodes.

After some hours spend on “indeterminate” state customization using pure CSS (huhu => big fail, how webix handle the indeterminate state stay a mystery for me, the HTML is the same as an unchecked checkbox, no extra attribute, and no css anywhere ??), i end up with this

Hello @franck34 ,

Yes, it seems like a bug.
Thank you for reporting and the examples!

1 Like