Skip to content

Build your personal knowledge base with Trilium Notes

chore(react/collections/table): react to note changes

Elian Doranff3800820757
diff --git a/apps/client/src/widgets/collections/table/tabulator.tsx b/apps/client/src/widgets/collections/table/tabulator.tsx
index 8deb1f9e3b..ff1d6556fd 100644
--- a/apps/client/src/widgets/collections/table/tabulator.tsx
+++ b/apps/client/src/widgets/collections/table/tabulator.tsx
@@ -52,6 +52,9 @@ export default function Tabulator<T>({ className, columns, data, modules, tabula
}
}, Object.values(events));
+ // Change in data.
+ useEffect(() => { tabulatorRef.current?.setData(data) }, [ data ]);
+
return (
<div ref={containerRef} className={className} />
);