mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
chore(collections/board): reintroduce note click on the board
This commit is contained in:
parent
e156f0a2e8
commit
245675d409
@ -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 ? (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user