mirror of https://github.com/grafana/grafana.git
Making sure we pass helpNode without Parents to the pathfinder app.
This commit is contained in:
parent
6b5b966a96
commit
6584361f66
|
@ -127,6 +127,9 @@ export const SingleTopBar = memo(function SingleTopBar({
|
|||
new OpenExtensionSidebarEvent({
|
||||
pluginId: 'grafana-grafanadocsplugin-app',
|
||||
componentTitle: 'Grafana Pathfinder',
|
||||
props: {
|
||||
helpNode: withoutParents(enrichedHelpNode),
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
@ -154,6 +157,14 @@ export const SingleTopBar = memo(function SingleTopBar({
|
|||
);
|
||||
});
|
||||
|
||||
function withoutParents(node: NavModelItem): NavModelItem {
|
||||
const { parentItem, ...rest } = node;
|
||||
return {
|
||||
...rest,
|
||||
children: node.children?.map(withoutParents),
|
||||
};
|
||||
}
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2, menuDockedAndOpen: boolean) => ({
|
||||
layout: css({
|
||||
height: getChromeHeaderLevelHeight(),
|
||||
|
|
Loading…
Reference in New Issue