mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-08-04 18:48:12 +00:00
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:
parent
41302a29ff
commit
5fc99ca26c
6 changed files with 8 additions and 14 deletions
|
@ -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))
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue