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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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