better search UX

This commit is contained in:
Jan Prochazka
2021-09-26 19:54:18 +02:00
parent 34fce0ef58
commit f85460cce8
3 changed files with 19 additions and 2 deletions

View File

@@ -25,6 +25,15 @@
})
: null;
$: childrenMatched = !groupFunc
? list.filter(data => {
const matcher = module.createChildMatcher && module.createChildMatcher(data);
if (matcher && !matcher(filter)) return false;
return true;
})
: null;
// let filtered = [];
// $: {
@@ -82,6 +91,7 @@
{checkedObjectsStore}
{disableContextMenu}
{filter}
isExpandedBySearch={childrenMatched.includes(data)}
/>
{/each}
{/if}