Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(note_grid): the note grid cannot open the context menu
SiriusXTb23252d04605
diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.css b/apps/client/src/widgets/collections/legacy/ListOrGridView.cssindex c6b21c0b1f..1bfa389e5c 100644--- a/apps/client/src/widgets/collections/legacy/ListOrGridView.css+++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.css@@ -142,4 +142,10 @@border: 1px solid var(--main-border-color);background: var(--more-accented-background-color);}++.note-list.grid-view .note-path {+ margin-left: 0.5em;+ vertical-align: middle;+ opacity: 0.5;+}/* #endregion */diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsxindex 8180e6d65c..136a8f225c 100644--- a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx+++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx@@ -103,16 +103,7 @@ function ListNoteCard({ note, parentNote, highlightedTokens, currentLevel, expan}function GridNoteCard({ note, parentNote, highlightedTokens }: { note: FNote, parentNote: FNote, highlightedTokens: string[] | null | undefined }) {- 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@@ -123,7 +114,7 @@ function GridNoteCard({ note, parentNote, highlightedTokens }: { note: FNote, pa><h5 className="note-book-header"><Icon className="note-icon" icon={note.getIcon()} />- <span ref={titleRef} className="note-book-title">{noteTitle}</span>+ <NoteLink className="note-book-title" notePath={notePath} noPreview showNotePath={parentNote.type === "search"} highlightedTokens={highlightedTokens} /><NoteAttributes note={note} /></h5><NoteContent