feat(book/table): support boolean type

This commit is contained in:
Elian Doran
2025-06-25 12:05:10 +03:00
parent b6398fdb5d
commit fb32d26479

View File

@@ -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);