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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bfb326-32259.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bfb326-32259.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?