mirror of
https://github.com/zadam/trilium.git
synced 2025-11-26 02:24:23 +01:00
chore(print/table): revert back to using the export module only
This commit is contained in:
parent
ab14bdbb18
commit
5c0cf09c42
@ -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
|
||||
<Tabulator
|
||||
tabulatorRef={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 }: V
|
||||
onReady={() => {
|
||||
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());
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user