Commit af6a7b1f by Torkel Ödegaard Committed by GitHub

Merge pull request #15125 from grafana/15108-page-title-update

Update <title> when navModel is changed
parents 920f51f2 7d8607c1
......@@ -9,9 +9,9 @@ import PageHeader from '../PageHeader/PageHeader';
import Footer from '../Footer/Footer';
import PageContents from './PageContents';
import { CustomScrollbar } from '@grafana/ui';
import { isEqual } from 'lodash';
interface Props {
title?: string;
children: JSX.Element[] | JSX.Element;
navModel: NavModel;
}
......@@ -28,7 +28,7 @@ class Page extends Component<Props> {
}
componentDidUpdate(prevProps: Props) {
if (prevProps.title !== this.props.title) {
if (!isEqual(prevProps.navModel, this.props.navModel)) {
this.updateTitle();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment