Fix: listview filter (#225)

* chore: bump desktop package version to 0.1.30

* chore: increase Node.js memory limit for desktop build process

* chore: configure Node.js memory limit for desktop build

* fix(desktop): list view filter mode
This commit is contained in:
Huakun 2025-03-02 12:51:53 -05:00 committed by GitHub
parent 41302a29ff
commit 5fc99ca26c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 8 additions and 14 deletions

View file

@ -144,10 +144,10 @@
let resultingItems = $derived<ListSchema.Item[]>(
// when search term changes, update the resulting items
listViewContent.filter === "none"
? searchTerm.length > 0
? (listViewContent.items ?? [])
: searchTerm.length > 0
? itemsFuse.search(searchTerm).map((item) => item.item)
: srcItems
: (listViewContent.items ?? [])
)
// section total height is auto derived from section refs
let sectionTotalHeight = $derived(srcSections.reduce((acc, s) => acc + (s.sectionHeight ?? 0), 0))

View file

@ -48,10 +48,10 @@
let resultingItems = $derived(
// when search term changes, update the resulting items
filterMode === "none"
? searchTerm.length > 0
? items
: searchTerm.length > 0
? fuse.search(searchTerm).map((item) => item.item)
: items
: items
)
$effect(() => {