Only live search on template or folder name

If you have a folder structure like this:

> FA / FB / FC

and you search for ‘FA’, it’s very noisy to see:

> FA / FB
> FA / FB / T1
> FA / FB / T2
> FA / FB / FC
> FA / FB / FC / T3
> …

It’s clearer to just show:

> FA / FB

This also has the benefit of, if you type ‘template’ (for example) you
don’t get every item any more, because it’s only looking at the name of
the thing. It used to look at the entire description, ie:

> A / B / C / Example
> Text message template

Now it only searches on the name:

> A / B / C / *Example*
> Text message template
This commit is contained in:
Chris Hill-Scott
2018-11-22 17:57:05 +00:00
parent ecdd605bca
commit cdb03d1eeb
3 changed files with 57 additions and 3 deletions

View File

@@ -9,7 +9,7 @@
$targets.each(function() {
let content = $(this).text();
let content = $('.live-search-relevant', this).text() || $(this).text();
if (query == '') {
$(this).css('display', '');