Skip to content

Build your personal knowledge base with Trilium Notes

feat(book/table): support boolean type

Elian Doranfb32d264795d
diff --git a/apps/client/src/widgets/view_widgets/table_view/data.ts b/apps/client/src/widgets/view_widgets/table_view/data.ts
index c08455e2bb..03f6d7fd46 100644
--- a/apps/client/src/widgets/view_widgets/table_view/data.ts
+++ b/apps/client/src/widgets/view_widgets/table_view/data.ts
@@ -92,8 +92,12 @@ export function buildRowDefinitions(notes: FNote[], infos: PromotedAttributeInfo
title: note.title
};
- for (const info of infos) {
- data[info.name] = note.getLabelValue(info.name);
+ for (const { name, type } of infos) {
+ if (type === "boolean") {
+ data[name] = note.hasLabel(name);
+ } else {
+ data[name] = note.getLabelValue(name);
+ }
}
definitions.push(data);