According to the author, jsTree Documentation:
When opening a closed node (that has no loaded children) an AJAX request is made.
How do I configure jsTree to get rid of these AJAX data requests made for each empty/childless node? I want my empty nodes remain empty (or childless)!
JSON data container (data.json)
{
"data" : "Root node with no children",
"children" : []
}
jsTree configuration
{
"json_data" : {
"ajax" : {
"url" : "data.json",
"type" : "GET",
"dataType" : "json",
"dataFilter" : function (data, type) {
//some filtering function
}
}
},
"plugin" : ["json_data"]
}
Mark the state of the leaf node as "leaf". That should fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With