Jstree keyboard navigation after searching with "show_only_matches" as true

I am trying to use jstree navigation with a search plugin. Everything is fine, but after I added show_only_matches as true, the navigation did not work properly. Maybe because there are hidden nodes, and jstree is trying to navigate through them.

Here is my jsfiddle

http://jsfiddle.net/53cvtbv9/1/

$(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 ...

+6
source share
1 answer
 $("#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); }); 
+9
source

Source: https://habr.com/ru/post/974769/


All Articles