I am trying to use jstree keyboard navigation with search plugin . Everything is ok but after I add show_only_matches as true the navigation didn't work as expected . Maybe because there are hidden nodes and jstree try to navigate through them ..
Here is my jsfiddle
$(function() {
$(".search-input").keyup(function() {
var searchString = $(this).val();
console.log(searchString);
$('#jstree').jstree('search', searchString);
});
$('#jstree').jstree({
'core': {
'data': [ ... ]
},
"search": {
"case_insensitive": true,
"show_only_matches" : true
},
"plugins": ["search"]
});
});
Any solution plz ...
$("#nacetree").jstree({
"core" : {'data' : nace} ,
"plugins" : [ "search" ] ,
"search": { "show_only_matches" : true}
});
var to = false;
$("#qnace").keyup(function () {
//if(to) { clearTimeout(to); }
to = setTimeout(function () {
var v = $('#qnace').val();
$('#nacetree').jstree(true).search(v);
}, 250);
});
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