mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 07:38:53 +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);
|
openNoteContextMenu(api, e, note.noteId, branch.branchId, column);
|
||||||
}, [ api, note, branch, 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.branchId);
|
||||||
}, [ setBranchIdToEdit, branch ]);
|
}, [ setBranchIdToEdit, branch ]);
|
||||||
|
|
||||||
@ -61,6 +66,7 @@ export default function Card({
|
|||||||
onDragStart={handleDragStart}
|
onDragStart={handleDragStart}
|
||||||
onDragEnd={handleDragEnd}
|
onDragEnd={handleDragEnd}
|
||||||
onContextMenu={handleContextMenu}
|
onContextMenu={handleContextMenu}
|
||||||
|
onClick={!isEditing ? handleOpen : undefined}
|
||||||
>
|
>
|
||||||
{!isEditing ? (
|
{!isEditing ? (
|
||||||
<>
|
<>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user