Skip to content

Commit 6b059a9

Browse files
committed
feat(ribbon): context menu for root item
1 parent 7377e4e commit 6b059a9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/client/src/widgets/Breadcrumb.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { FormListItem } from "./react/FormList";
1111
import { useChildNotes, useNoteContext, useNoteLabel, useNoteProperty } from "./react/hooks";
1212
import Icon from "./react/Icon";
1313
import NoteLink from "./react/NoteLink";
14+
import link_context_menu from "../menus/link_context_menu";
1415

1516
const COLLAPSE_THRESHOLD = 5;
1617
const INITIAL_ITEMS = 2;
@@ -67,6 +68,10 @@ function BreadcrumbRoot({ noteContext }: { noteContext: NoteContext | undefined
6768
icon={note.getIcon()}
6869
text={title ?? ""}
6970
onClick={() => noteContext?.setNote("root")}
71+
onContextMenu={(e) => {
72+
e.preventDefault();
73+
link_context_menu.openContextMenu(note.noteId, e);
74+
}}
7075
/>
7176
);
7277
}

0 commit comments

Comments
 (0)