Guys,
Thank you for all the hard work you have done on jsTree it really works great.
I have a small problem with my implementation, we are rendering quite large trees, the leaf nodes are mostly named the same. This is because we have a lot of channels and ww can select the same units on all the channels.
The challenge however comes in when we search, if you for instance start the search with "k" the DOM crashes because there are so many matches on all the nodes.
What I want to achieve is to have a search function that only searches the parent nodes never a leaf. There is a css attribute set to all the parent nodes that remove the check box. So basically I want to search only nodes without check-boxes.
I guess it will be something like this code, but I cant get it to work correctly:
.on('search.jstree before_open.jstree', function (e, data) {
if(data.instance.settings.search.show_only_matches) {
data.instance._data.search.dom.find('.jstree-node')
.show().filter('.jstree-last').filter(function() { return this.nextSibling; }).removeClass('jstree-last')
.end().end().end().find(".jstree-children").each(function () { $(this).children(".jstree-node:visible").eq(-1).addClass("jstree-last"); });
}
}