rune-langium / visual-editor/src / useTypeNavigationMenu
Function: useTypeNavigationMenu()
ts
function useTypeNavigationMenu(actions): {
hasActions: boolean;
menu: Element | null;
onKeyDown: (event, nodeId) => void;
open: (event, nodeId) => void;
targetProps: (nodeId, label?) => {
"aria-haspopup"?: "menu";
"aria-label"?: string;
onContextMenu: (event) => void;
onKeyDown: (event) => void;
role?: string;
tabIndex?: number;
};
};Defined in: packages/visual-editor/src/components/TypeNavigationMenu.tsx:55
Targets must already be resolved by the owning link, tree or Structure adapter.
Parameters
| Parameter | Type |
|---|---|
actions | TypeNavigationActions |
Returns
ts
{
hasActions: boolean;
menu: Element | null;
onKeyDown: (event, nodeId) => void;
open: (event, nodeId) => void;
targetProps: (nodeId, label?) => {
"aria-haspopup"?: "menu";
"aria-label"?: string;
onContextMenu: (event) => void;
onKeyDown: (event) => void;
role?: string;
tabIndex?: number;
};
}| Name | Type | Defined in |
|---|---|---|
hasActions | boolean | packages/visual-editor/src/components/TypeNavigationMenu.tsx:98 |
menu | Element | null | packages/visual-editor/src/components/TypeNavigationMenu.tsx:98 |
onKeyDown() | (event, nodeId) => void | packages/visual-editor/src/components/TypeNavigationMenu.tsx:98 |
open() | (event, nodeId) => void | packages/visual-editor/src/components/TypeNavigationMenu.tsx:98 |
targetProps() | (nodeId, label?) => { "aria-haspopup"?: "menu"; "aria-label"?: string; onContextMenu: (event) => void; onKeyDown: (event) => void; role?: string; tabIndex?: number; } | packages/visual-editor/src/components/TypeNavigationMenu.tsx:98 |