Dashboard: Fixes closing share modal (#92267)

This commit is contained in:
Torkel Ödegaard
2024-08-22 13:35:24 +02:00
committed by GitHub
parent 7b9843bc13
commit 3e84b2ba2f

View File

@@ -88,7 +88,12 @@ export class ShareModal extends SceneObjectBase<ShareModalState> implements Moda
}
onDismiss = () => {
locationService.partial({ shareView: null });
if (this.state.panelRef) {
const dashboard = getDashboardSceneFor(this);
dashboard.closeModal();
} else {
locationService.partial({ shareView: null });
}
};
onChangeTab: ComponentProps<typeof ModalTabsHeader>['onChangeTab'] = (tab) => {