feat(filters): add No tags filter to transactions and shared pages

This commit is contained in:
2026-04-13 05:20:49 +10:00
parent 1296555f17
commit 1b561af9e9
4 changed files with 42 additions and 13 deletions
+7 -2
View File
@@ -651,9 +651,14 @@ function TransactionsContent() {
placeholder="All Banks"
/>
<MultiSelect
options={(tags ?? []).map((t) => ({ value: String(t.id), label: t.name }))}
options={[{ value: "untagged", label: "No tags" }, ...(tags ?? []).map((t) => ({ value: String(t.id), label: t.name }))]}
value={filters.tag_ids}
onChange={(v) => setFilters((f) => ({ ...f, tag_ids: v, offset: 0 }))}
onChange={(v) => {
let next = v;
if (v.includes("untagged") && !filters.tag_ids.includes("untagged")) next = ["untagged"];
else if (filters.tag_ids.includes("untagged") && v.length > 1) next = v.filter((x) => x !== "untagged");
setFilters((f) => ({ ...f, tag_ids: next, offset: 0 }));
}}
placeholder="All Tags"
/>
<MultiSelect