Commit 7d8607c1 by Johannes Schill

fix: Remove legacy title-prop and update document.title when navModel is changed #15108

parent 365de9de
......@@ -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