Skip to content

Commit

Permalink
Merge pull request #1 from wikiped/wikiped-tree-filter-case-insensitive
Browse files Browse the repository at this point in the history
Update tree-filter.index.js to make search case insensitive
  • Loading branch information
wikiped authored Apr 6, 2017
2 parents 3958a02 + 048f9ca commit 743370b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ define([
function filterRows (filterText) {
var rows = Array.prototype.concat.apply([], document.querySelectorAll('.list_item.row'));
rows.forEach(function (row) {
if (!filterText || row.querySelector('.item_name').innerHTML.indexOf(filterText) !== -1) {
if (!filterText || row.querySelector('.item_name').innerHTML.search(new RegExp(filterText, "i")) !== -1) {
row.style.display = '';
} else {
row.style.display = 'none';
Expand All @@ -59,4 +59,4 @@ define([
load_ipython_extension : load_ipython_extension
};

});
});

0 comments on commit 743370b

Please sign in to comment.