diff --git a/apps/client/src/widgets/collections/table/TablePrintView.tsx b/apps/client/src/widgets/collections/table/TablePrintView.tsx index 9582b4360..534ba5764 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 { 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()); }} /> ) : (