PanelInspectDrawer: Fix issue where closing inspect drawer on home dashboard redirects to new dashboard (#96711)

This commit is contained in:
kay delaney
2024-11-19 18:55:14 +00:00
committed by GitHub
parent 2ffb7344e8
commit 8527f986db

View File

@@ -92,6 +92,8 @@ export class PanelInspectDrawer extends SceneObjectBase<PanelInspectDrawerState>
onClose = () => {
const dashboard = getDashboardSceneFor(this);
const meta = dashboard.state.meta;
locationService.push(
getDashboardUrl({
uid: dashboard.state.uid,
@@ -101,6 +103,7 @@ export class PanelInspectDrawer extends SceneObjectBase<PanelInspectDrawerState>
inspect: null,
inspectTab: null,
},
isHomeDashboard: !meta.url && !meta.slug && !meta.isNew,
})
);
};