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

This commit is contained in:
Elian Doran 2025-09-12 16:24:35 +03:00
parent e156f0a2e8
commit 245675d409
No known key found for this signature in database

View File

@ -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 ? (
<>