hide tags that only have completed tasks unless show completed is selected

This commit is contained in:
2026-06-16 21:03:21 -07:00
parent 8d960c615d
commit 45299ff69e
+5 -1
View File
@@ -127,6 +127,7 @@ class OrgTodoListView extends ItemView {
cb.addEventListener("change", () => {
this.showDone = cb.checked;
this.renderList();
this.renderTagBar();
});
this.tagBarEl = root.createDiv({ cls: "org-todo-tagbar" });
@@ -224,7 +225,10 @@ class OrgTodoListView extends ItemView {
// Every tag in the vault — the chip bar is a stable, complete palette.
const all = new Set();
for (const t of this.tasks) t.tags.forEach((x) => all.add(x));
for (const t of this.tasks) {
if (!this.showDone && t.done) continue;
t.tags.forEach((x) => all.add(x));
}
// Prune active filters whose tag no longer exists (the ghost-filter fix).
for (const tag of [...this.activeTags]) {