Skip to content

Commit

Permalink
Dashboard: Fixes closing share modal (grafana#92267)
Browse files Browse the repository at this point in the history
  • Loading branch information
torkelo authored Aug 22, 2024
1 parent 7b9843b commit 3e84b2b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion public/app/features/dashboard-scene/sharing/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 3e84b2b

Please sign in to comment.