feat(filters): add No tags filter to transactions and shared pages
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user