Skip to content

Build your personal knowledge base with Trilium Notes

Merge remote-tracking branch 'origin/stable'

Elian Doranbdc220ec122c
diff --cc apps/client/src/widgets/collections/legacy/ListOrGridView.tsx
index 5b0d47d979,74e2182b71..40e6ae0bc6
--- a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx
+++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx
@@@ -101,8 -103,17 +102,10 @@@ function ListNoteCard({ note, parentNot
);
}
- function GridNoteCard({ note, parentNote, highlightedTokens }: { note: FNote, parentNote: FNote, highlightedTokens: string[] | null | undefined }) {
+ function GridNoteCard({ note, parentNote, highlightedTokens, includeArchived }: { note: FNote, parentNote: FNote, highlightedTokens: string[] | null | undefined, includeArchived: boolean }) {
+ const titleRef = useRef<HTMLSpanElement>(null);
+ const [ noteTitle, setNoteTitle ] = useState<string>();
const notePath = getNotePath(parentNote, note);
- const highlightSearch = useImperativeSearchHighlighlighting(highlightedTokens);
-
- useEffect(() => {
- tree.getNoteTitle(note.noteId, parentNote.noteId).then(setNoteTitle);
- }, [ note ]);
-
- useEffect(() => highlightSearch(titleRef.current), [ noteTitle, highlightedTokens ]);
return (
<div