@samitouri / QOSami-HFS / commits / f8bf9425

fix: inconsistent state for select-all after deleting #700

Massimo Melina committed Aug 15, 2024 at 18:03 UTC f8bf9425e386cca244bf34b094cb33c0b6da6e0b
1 file changed +4
frontend/src/FilterBar.ts
+4
@@ -17,6 +17,10 @@ export function FilterBar() {
17
18 const sel = Object.keys(selected).length
19 const fil = filteredList?.length
20 + useEffect(() => {
21 + if (all && sel < (fil || list.length))
22 + setAll(false)
23 + }, [sel])
24 const tabIndex = showFilter ? undefined : -1
25 return h('div', { id: 'filter-bar', style: { display: showFilter ? undefined : 'none' } },
26 h(Checkbox, {