This callback is made before zTree makes an ajax request, giving you an opportunity to decide if it should proceed or not. Return false to prevent zTree from sending the ajax request.
Default: null
zTree unique identifier: treeId.
JSON data object of the parent node
When asynchronously loading the root, treeNode = null
return true or false
If the function returns false, zTree will not send the ajax request, and will not trigger the 'onAsyncSuccess / onAsyncError' callback.
function myBeforeCallBack(treeId, treeNode) {
return (treeNode.id !== 1);
};
var setting = {
callback: {
beforeAsync: myBeforeCallBack
}
};
......