mirror of
https://github.com/zadam/trilium.git
synced 2025-10-19 22:58:52 +02:00
feat(collection/presentation): react to tree changes
This commit is contained in:
parent
b1babd62aa
commit
c8b7322f1e
@ -17,14 +17,14 @@ const stylesheets = [
|
|||||||
slideCustomStylesheet
|
slideCustomStylesheet
|
||||||
].map(stylesheet => stylesheet.replace(/:root/g, ":host"));
|
].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 [ presentation, setPresentation ] = useState<PresentationModel>();
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
const containerRef = useRef<HTMLDivElement>(null);
|
||||||
const apiRef = useRef<Reveal.Api>(null);
|
const apiRef = useRef<Reveal.Api>(null);
|
||||||
|
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
buildPresentationModel(note).then(setPresentation);
|
buildPresentationModel(note).then(setPresentation);
|
||||||
}, [ note ]);
|
}, [ note, noteIds ]);
|
||||||
|
|
||||||
return presentation && (
|
return presentation && (
|
||||||
<>
|
<>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user