tree.hasChildren appears to have stopped working for me having moved to dhtmlxSuite Pro v2.5
It used to return count but now
- if no children - returns 0
- if 1 child and subtree close it returns true <<<<<< expected 1
- if 1 child and subtree open it returns 1
if 1 child and subtree close it returns true <<<<<< expected 1
Probably you use dynamic loading. If a branch isn’t loaded, the true is returned (as the real number is unknown).
Apologies Alexandra you are absolutely right the behaviour is correct, just that no one had noticed the change with my switch to dynamic loading. I’ve amended my code thank you for your help.
if 0 child and subtree closed it returns 0 so false
if 1+ child and subtree closed it returns true