When the ztree data is initialized, all the child nodes are selected, but the parent node is not selected?

check box for ztree:

clipboard.png
my code:

  var treeObj = $.fn.zTree.init($("-sharptreeDemo"), setting, zNodes);
        console.log(zNodes);
        
        treeObj.expandAll(true);

which god will take a look at it for me

Mar.16,2021

as far as I know, this is not the same meaning, is it? Your last line of code is to expand the node, right?
as to whether a node is selected by default, you need to print the tree you got from the foreground on the console and look at it.


did you set the setting.check.chkboxType property.

Menu