Skip to content

Build your personal knowledge base with Trilium Notes

chore(collections/board): reintroduce note click on the board

Elian Doran245675d409da
diff --git a/apps/client/src/widgets/collections/board/card.tsx b/apps/client/src/widgets/collections/board/card.tsx
index 4ad335b4bb..165eccc751 100644
--- a/apps/client/src/widgets/collections/board/card.tsx
+++ b/apps/client/src/widgets/collections/board/card.tsx
@@ -42,7 +42,12 @@ export default function Card({
openNoteContextMenu(api, e, note.noteId, branch.branchId, column);
}, [ api, note, branch, column ]);
- const handleEdit = useCallback((e) => {
+ const handleOpen = useCallback(() => {
+ api.openNote(note.noteId);
+ }, [ api, note ]);
+
+ const handleEdit = useCallback((e: MouseEvent) => {
+ e.stopPropagation(); // don't also open the note
setBranchIdToEdit?.(branch.branchId);
}, [ setBranchIdToEdit, branch ]);
@@ -61,6 +66,7 @@ export default function Card({
onDragStart={handleDragStart}
onDragEnd={handleDragEnd}
onContextMenu={handleContextMenu}
+ onClick={!isEditing ? handleOpen : undefined}
>
{!isEditing ? (
<>