Dashboard: Fixes issue with title or folder change has no effect after exiting settings view (#34677)

* Dashboard: Fixes issue with title or folder change has no effect after existing settings view

* Updates snapshot
This commit is contained in:
Torkel Ödegaard
2021-05-27 10:07:51 +02:00
committed by GitHub
parent 29be741f26
commit 6394a60a08
3 changed files with 9 additions and 3 deletions

View File

@@ -24,6 +24,8 @@ export interface OwnProps {
isFullscreen: boolean;
kioskMode: KioskMode;
hideTimePicker: boolean;
folderTitle?: string;
title: string;
onAddPanel: () => void;
}
@@ -245,14 +247,14 @@ class DashNav extends PureComponent<Props> {
}
render() {
const { dashboard, isFullscreen } = this.props;
const { isFullscreen, title, folderTitle } = this.props;
const onGoBack = isFullscreen ? this.onClose : undefined;
return (
<PageToolbar
pageIcon={isFullscreen ? undefined : 'apps'}
title={dashboard.title}
parent={dashboard.meta.folderTitle}
title={title}
parent={folderTitle}
onClickTitle={this.onDashboardNameClick}
onClickParent={this.onFolderNameClick}
onGoBack={onGoBack}