From 17774871661d0ae3f1d07c1f3aca8a8074cfb152 Mon Sep 17 00:00:00 2001 From: Trey Wallis <40307803+trey-wallis@users.noreply.github.com> Date: Tue, 5 Dec 2023 01:35:33 -0700 Subject: [PATCH 1/3] fix: resolve checkbox filter not updating --- src/react/loom-app/option-bar/filter-menu/index.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/react/loom-app/option-bar/filter-menu/index.tsx b/src/react/loom-app/option-bar/filter-menu/index.tsx index 82253f8c..f3f33733 100644 --- a/src/react/loom-app/option-bar/filter-menu/index.tsx +++ b/src/react/loom-app/option-bar/filter-menu/index.tsx @@ -304,8 +304,8 @@ export default function FilterMenu({ onUpdate(id, { text }); } - function onCheckboxChange(id: string, text: string) { - onUpdate(id, { text }); + function onCheckboxChange(id: string, value: boolean) { + onUpdate(id, { value }); } function onDateFilterOptionChange(id: string, option: DateFilterOption) { @@ -432,14 +432,12 @@ export default function FilterMenu({ } case CellType.CHECKBOX: { const { value } = filter as CheckboxFilter; + console.log(value); inputNode = ( - onCheckboxChange( - id, - newValue.toString() - ) + onCheckboxChange(id, newValue) } /> ); From 5acd80ec162d148a44b3ab2f92abf9f16f4aca0c Mon Sep 17 00:00:00 2001 From: Trey Wallis <40307803+trey-wallis@users.noreply.github.com> Date: Tue, 5 Dec 2023 01:35:55 -0700 Subject: [PATCH 2/3] fix: resolve crash for incorrect validation of checkbox filter --- src/shared/loom-state/validate-state.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/loom-state/validate-state.ts b/src/shared/loom-state/validate-state.ts index 7168b940..827bde1b 100644 --- a/src/shared/loom-state/validate-state.ts +++ b/src/shared/loom-state/validate-state.ts @@ -223,7 +223,7 @@ const CheckboxConditionUnion = Union( const CheckboxFilter = BaseFilter.extend({ type: Literal(CellType.CHECKBOX), condition: CheckboxConditionUnion, - text: String, + value: Boolean, }); const TagFilterConditionUnion = Union( From f7d3bf7caea5da0759ab2b56a8b0b6f6e6f1a946 Mon Sep 17 00:00:00 2001 From: Trey Wallis <40307803+trey-wallis@users.noreply.github.com> Date: Tue, 5 Dec 2023 01:37:23 -0700 Subject: [PATCH 3/3] chore: bump version --- manifest.json | 2 +- package.json | 2 +- src/react/loom-app/option-bar/filter-menu/index.tsx | 1 - versions.json | 3 ++- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index d6d6adf8..896d1f34 100644 --- a/manifest.json +++ b/manifest.json @@ -9,5 +9,5 @@ "fundingUrl": { "Buymeacoffee": "https://www.buymeacoffee.com/treywallis" }, - "version": "8.15.6" + "version": "8.15.7" } diff --git a/package.json b/package.json index 02fb0715..0622a125 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-dataloom", - "version": "8.15.6", + "version": "8.15.7", "description": "Weave together data from diverse sources into different views. Inspired by Excel Spreadsheets and Notion.so.", "main": "main.js", "scripts": { diff --git a/src/react/loom-app/option-bar/filter-menu/index.tsx b/src/react/loom-app/option-bar/filter-menu/index.tsx index f3f33733..4c36fcf5 100644 --- a/src/react/loom-app/option-bar/filter-menu/index.tsx +++ b/src/react/loom-app/option-bar/filter-menu/index.tsx @@ -432,7 +432,6 @@ export default function FilterMenu({ } case CellType.CHECKBOX: { const { value } = filter as CheckboxFilter; - console.log(value); inputNode = (