Skip to content

Build your personal knowledge base with Trilium Notes

feat(collection/presentation): react to tree changes

Elian Doranc8b7322f1e3f
diff --git a/apps/client/src/widgets/collections/presentation/index.tsx b/apps/client/src/widgets/collections/presentation/index.tsx
index 1d086fef75..5760fd2dd6 100644
--- a/apps/client/src/widgets/collections/presentation/index.tsx
+++ b/apps/client/src/widgets/collections/presentation/index.tsx
@@ -17,14 +17,14 @@ const stylesheets = [
slideCustomStylesheet
].map(stylesheet => stylesheet.replace(/:root/g, ":host"));
-export default function PresentationView({ note }: ViewModeProps<{}>) {
+export default function PresentationView({ note, noteIds }: ViewModeProps<{}>) {
const [ presentation, setPresentation ] = useState<PresentationModel>();
const containerRef = useRef<HTMLDivElement>(null);
const apiRef = useRef<Reveal.Api>(null);
useLayoutEffect(() => {
buildPresentationModel(note).then(setPresentation);
- }, [ note ]);
+ }, [ note, noteIds ]);
return presentation && (
<>