#112 Tree filter case insensitive search

* adds case insensitive search for TreeWidget
This commit is contained in:
mpeltriaux 2022-02-16 08:31:18 +01:00
parent ed27d8d589
commit 91185ef847

View File

@ -41,7 +41,11 @@
var elem = $(this);
var val = elem.val()
var allTreeElements = $(".tree-element")
var allTreeElementsContain = $(".tree-element:contains(" + val + ")")
var allTreeElementsContain = $(".tree-element").filter(function(){
var reg = new RegExp(val, "i");
return reg.test($(this).text());
}
);
if(val.length > 0){
allTreeElements.hide()
allTreeElementsContain.show()