Add shortcut description to right click + add Suppr shortcut + Fix next selection after deletion
This commit is contained in:
parent
4e3c5d71fd
commit
d580890b9d
6 changed files with 87 additions and 9 deletions
|
@ -16,6 +16,9 @@ export interface IMenuAction {
|
|||
/** title to show on hover */
|
||||
title?: string
|
||||
|
||||
/** description of the shortcut */
|
||||
shortcut?: string
|
||||
|
||||
/** function to be called on button click */
|
||||
action: (target: HTMLElement) => void
|
||||
}
|
||||
|
@ -101,6 +104,7 @@ export function Menu(props: IMenuProps): JSX.Element {
|
|||
className={'contextmenu-item'}
|
||||
text={action.text}
|
||||
title={action.title}
|
||||
shortcut={action.shortcut}
|
||||
onClick={() => action.action(target)} />);
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue