mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Navigation: Add help menu to top search bar (#55062)
* add help menu to top search bar * fixes * handle preventDefault in node graph specifically * use icon prop of MenuItem * undo changes to ContextMenuPlugin/DataLinksContextMenu * remove unused component * revert storybook changes * Tweaks * remove unused style * stop propagation on the header so version can be highlighted * make sure useContextMenu has the exact same logic as before Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com> Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
@@ -109,7 +109,17 @@ function mapMenuItem<T extends NodeDatum | EdgeDatum>(item: T) {
|
||||
url={link.url}
|
||||
label={link.label}
|
||||
ariaLabel={link.ariaLabel}
|
||||
onClick={link.onClick ? () => link.onClick?.(item) : undefined}
|
||||
onClick={
|
||||
link.onClick
|
||||
? (event) => {
|
||||
if (!(event?.ctrlKey || event?.metaKey || event?.shiftKey)) {
|
||||
event?.preventDefault();
|
||||
event?.stopPropagation();
|
||||
link.onClick?.(item);
|
||||
}
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
target={'_self'}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user