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
chore(print/table): revert back to using the export module only
Elian Doran5c0cf09c425b
diff --git a/apps/client/src/widgets/collections/table/TablePrintView.tsx b/apps/client/src/widgets/collections/table/TablePrintView.tsxindex 9582b43600..534ba5764a 100644--- a/apps/client/src/widgets/collections/table/TablePrintView.tsx+++ b/apps/client/src/widgets/collections/table/TablePrintView.tsx@@ -1,7 +1,7 @@import { useEffect, useRef, useState } from "preact/hooks";import { ViewModeProps } from "../interface";import useData, { TableConfig } from "./data";-import { ExportModule, FormatModule, PrintModule, Tabulator as VanillaTabulator} from 'tabulator-tables';+import { ExportModule, FormatModule, Tabulator as VanillaTabulator} from 'tabulator-tables';import Tabulator from "./tabulator";import { RawHtmlBlock } from "../../react/RawHtml";import "./TablePrintView.css";@@ -26,7 +26,7 @@ export default function TablePrintView({ note, noteIds, viewConfig, onReady }: V<TabulatortabulatorRef={tabulatorRef}className="table-print-view-container"- modules={[ PrintModule, ExportModule, FormatModule ]}+ modules={[ ExportModule, FormatModule ]}columns={columnDefs ?? []}data={rowData}index="branchId"@@ -36,11 +36,7 @@ export default function TablePrintView({ note, noteIds, viewConfig, onReady }: VonReady={() => {const tabulator = tabulatorRef.current;if (!tabulator) return;- const generatedTable = tabulator.modules.export.generateTable(tabulator.options.printConfig, tabulator.options.printStyled, tabulator.options.printRowRange, "print");- if(tabulator.options.printFormatter){- tabulator.options.printFormatter(tabulator.element, generatedTable);- }- setHtml(generatedTable.outerHTML);+ setHtml(tabulator.getHtml());}}/>) : (