Set to show or hide the remove button. It is valid when [setting.edit.enable = true]
When you click the remove button:
1. zTree will trigger the setting.callback.beforeRemove callback, and you can decide whether to allow delete.
2. If you don't set the 'beforeRemove' or the 'beforeRemove' callback return true, so zTree will trigger the setting.callback.onRemove callback after remove the node.
Default: true
true means: show the remove button
false means: hide the remove button
zTree unique identifier: treeId.
JSON data object of the node which show the remove button
Return value is same as 'Boolean Format'
var setting = {
edit: {
enable: true,
showRemoveBtn: false
}
};
......
function setRemoveBtn(treeId, treeNode) {
return !treeNode.isParent;
}
var setting = {
edit: {
enable: true,
showRemoveBtn: setRemoveBtn
}
};
......