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(react/collections/table): fix occasional error when initializing
Elian Doran33a37be37820
diff --git a/apps/client/src/widgets/collections/table/tabulator.tsx b/apps/client/src/widgets/collections/table/tabulator.tsxindex 9191f22da7..fdcbeb532f 100644--- a/apps/client/src/widgets/collections/table/tabulator.tsx+++ b/apps/client/src/widgets/collections/table/tabulator.tsx@@ -33,11 +33,13 @@ export default function Tabulator<T>({ className, columns, data, modules, tabulacolumns,data,footerElement: (parentComponent && footerElement ? renderReactWidget(parentComponent, footerElement)[0] : undefined),- ...restProps,+ ...restProps});- tabulatorRef.current = tabulator;- externalTabulatorRef.current = tabulator;+ tabulator.on("tableBuilt", () => {+ tabulatorRef.current = tabulator;+ externalTabulatorRef.current = tabulator;+ });return () => tabulator.destroy();}, []);