Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(book/table): clean up
Elian Doran66761a69d32c
diff --git a/apps/client/src/widgets/view_widgets/table_view/data.ts b/apps/client/src/widgets/view_widgets/table_view/data.tsindex 03f6d7fd46..046cef52bf 100644--- a/apps/client/src/widgets/view_widgets/table_view/data.ts+++ b/apps/client/src/widgets/view_widgets/table_view/data.ts@@ -16,7 +16,7 @@ type GridLabelType = 'text' | 'number' | 'boolean' | 'date' | 'dateString' | 'obexport function buildData(parentNote: FNote, notes: FNote[]) {const info = getPromotedAttributeInformation(parentNote);- const columnDefs = buildColumnDefinitions(parentNote, info);+ const columnDefs = buildColumnDefinitions(info);const rowData = buildRowDefinitions(notes, info);return {@@ -25,7 +25,7 @@ export function buildData(parentNote: FNote, notes: FNote[]) {}}-export function buildColumnDefinitions(parentNote: FNote, info: PromotedAttributeInformation[]) {+export function buildColumnDefinitions(info: PromotedAttributeInformation[]) {const columnDefs: GridOptions<Data>["columnDefs"] = [{field: "title"@@ -46,7 +46,6 @@ export function buildColumnDefinitions(parentNote: FNote, info: PromotedAttributfunction getPromotedAttributeInformation(parentNote: FNote) {const info: PromotedAttributeInformation[] = [];for (const promotedAttribute of parentNote.getPromotedDefinitionAttributes()) {- console.log(promotedAttribute);if (promotedAttribute.type !== "label") {console.warn("Relations are not supported for now");continue;