Skip to content

Build your personal knowledge base with Trilium Notes

chore(client): fix typecheck

Elian Dorand21127e3a76b
diff --git a/apps/client/src/print.tsx b/apps/client/src/print.tsx
index 1ee44ac9ea..16b41cd42a 100644
--- a/apps/client/src/print.tsx
+++ b/apps/client/src/print.tsx
@@ -101,7 +101,9 @@ function SingleNoteRenderer({ note, onReady }: RendererProps) {
await loadCustomCss(note);
}
- load().then(() => requestAnimationFrame(() => onReady({})));
+ load().then(() => requestAnimationFrame(() => onReady({
+ type: "single-note"
+ })));
}, [ note ]);
return <>
diff --git a/apps/client/src/widgets/collections/table/TablePrintView.tsx b/apps/client/src/widgets/collections/table/TablePrintView.tsx
index 534ba5764a..236d741592 100644
--- a/apps/client/src/widgets/collections/table/TablePrintView.tsx
+++ b/apps/client/src/widgets/collections/table/TablePrintView.tsx
@@ -1,10 +1,12 @@
+import "./TablePrintView.css";
+
import { useEffect, useRef, useState } from "preact/hooks";
+import { ExportModule, FormatModule, Tabulator as VanillaTabulator} from 'tabulator-tables';
+
+import { RawHtmlBlock } from "../../react/RawHtml";
import { ViewModeProps } from "../interface";
import useData, { TableConfig } from "./data";
-import { ExportModule, FormatModule, Tabulator as VanillaTabulator} from 'tabulator-tables';
import Tabulator from "./tabulator";
-import { RawHtmlBlock } from "../../react/RawHtml";
-import "./TablePrintView.css";
export default function TablePrintView({ note, noteIds, viewConfig, onReady }: ViewModeProps<TableConfig>) {
const tabulatorRef = useRef<VanillaTabulator>(null);
@@ -13,7 +15,10 @@ export default function TablePrintView({ note, noteIds, viewConfig, onReady }: V
useEffect(() => {
if (!html) return;
- onReady?.();
+ onReady?.({
+ type: "collection",
+ ignoredNoteIds: []
+ });
}, [ html ]);
return rowData && (
@@ -45,5 +50,5 @@ export default function TablePrintView({ note, noteIds, viewConfig, onReady }: V
</div>
</>
- )
+ );
}