diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx index 55415e7c1..80087f584 100644 --- a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx +++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx @@ -35,7 +35,7 @@ export function ListView({ note, noteIds: unfilteredNoteIds, highlightedTokens } ); } -export function ListPrintView({ note, noteIds: unfilteredNoteIds, highlightedTokens }: ViewModeProps<{}>) { +export function ListPrintView({ note, noteIds: unfilteredNoteIds, highlightedTokens, onReady }: ViewModeProps<{}>) { const noteIds = useFilteredNoteIds(note, unfilteredNoteIds); const [ notes, setNotes ] = useState(); @@ -43,6 +43,12 @@ export function ListPrintView({ note, noteIds: unfilteredNoteIds, highlightedTok froca.getNotes(noteIds).then(setNotes); }, [noteIds]); + useEffect(() => { + if (notes && onReady) { + onReady(); + } + }, [ notes, onReady ]); + return (