我正在使用Gijgo TreeView javascript库,并希望使特定节点不可选择。有办法吗?
我的树启动代码:
tree = $('#tree').tree({
primaryKey: 'id',
uiLibrary: 'materialdesign',
dataSource: {
url: '@Url.Content("~/FilteredRecords/")@Model.FilterPack'},
checkboxes: true,
expandAll: true,
dataBound: function (e) {
tree.expandAll();
},
select: function (e, node, id) {
if (node[0].childElementCount<2) {
loadIframe('contentFrame', '@Url.Content("~/images/")' + id);
} else {
loadIframe('contentFrame', '@Url.Content("~/PDFs/Blank.pdf")');
}
}
});