I using the fancytree plugin.
sometimes i get empty data from the server(because this the result of the user input). but i want to know that ther is no data.
what is the event when there is no data?
You can use the loadChildren
event which fires when the initial nodes are loaded (and after lazy nodes are expanded and loaded).
data.node.children
contains the result then.
loadError
is another event you may want to know of:
$("#tree").fancytree({
loadChildren: function(event, data) {
console.log(event.type, data.node.children.length);
},
loadError: function(event, data) {
console.log(event.type, data);
},