Function(parentNode, reloadType, isSilent)zTreeObj.reAsyncChildNodesPromise

Overview[ depends on jquery.ztree.core js ]

Forced asynchronous loading child nodes of parent node ( for ES6 Promise ). It is valid when [setting.async.enable = true]

You can use this method to reload child nodes.

Please use zTree object to executing the method.

v3.5.29+

Function Parameter Descriptions

parentNodeJSON

The parent node which will asynchronous loading child nodes.

1. If parentNode = null, it is same as reload root nodes.

2. If parentNode.isParent = false, don't load nodes.

3. Please ensure that this data object is an internal node data object in zTree.

reloadTypeString

reloadType = "refresh" means: reload child nodes.

reloadType != "refresh" means: append to load child nodes.

isSilentBoolean

Set whether to automatically expand the parent node, after load nodes.

isSilent = true means: don't auto expand the parent node. Otherwise auto expand.

Return ES6 Promise

Promise Object of ES6

Examples of function

1. reload root nodes

var treeObj = $.fn.zTree.getZTreeObj("tree");
treeObj.reAsyncChildNodes(null, "refresh");

2. reload the first selected node's child nodes.

var treeObj = $.fn.zTree.getZTreeObj("tree");
var nodes = treeObj.getSelectedNodes();
if (nodes.length>0) {
	treeObj.reAsyncChildNodes(nodes[0], "refresh");
}