mirror of
https://github.com/zadam/trilium.git
synced 2025-11-04 20:36:13 +01:00
feat(book/table): support boolean type
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user