Hello,
I have this configuration for my tree :
$(document).ready(function(){
$("#arbre").jstree({
"plugins" : [ "json_data", "themes", "ui", "search","massload", "core"],
"search" : {
"case_sensitive": false,
"ajax" : {
"url" : "service/rech",
"data" : {}
}
},
"massload" : function (nodes, callback){
$.get("/service/max?node="+ nodes.join(","))
.node(function(data){
callback(data);
})
};
"core" : {
"check_callback": true,
"multiple": false,
"worker": false,
"expand_selected_onload": true,
"opened": true,
"themes": {
"dots" : false,
"responsive": true,
"icons": true},
"data": {
"url": function (node) {
console.log(
node.id);
return
node.id === '#' ?
"/service/top":
"/service/mere"
},
"data" : function (node) {
return {'id' :
node.id};
}
} }
});
});
});
And I search with this function :
$(document).ready(function(){
$(".situation").on("click", function(e){
var id = $(this).attr('id');
e.preventDefault();
$("#arbre").jstree(true).search(id);
$(this).tab('show);
});
});
The result return a JSON with id of node to open to arrived on the node searching. But the trees isn't deploying to the node ..
If the node is alreardy open, i didn't have focus and isn't highlight.
How to do pls ?
Thanks, best regards