From 14d5d3ad060adab5207dbd6e57e0746cdf66df09 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Tue, 21 Jan 2020 15:05:15 +0100 Subject: [PATCH] Page title is now set correctly --- CHANGELOG.md | 1 + scm-ui/ui-components/src/layout/Page.tsx | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a83e5b743b..8c2446c4df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Subversion revision 0 leads to error - Create mock subject to satisfy legman - Multiple versions of hibernate-validator caused problems when starting from plugins +- Page title is now set correctly ## 2.0.0-rc1 - 2019-12-02 ### Added diff --git a/scm-ui/ui-components/src/layout/Page.tsx b/scm-ui/ui-components/src/layout/Page.tsx index 472acc0410..fe8ace9253 100644 --- a/scm-ui/ui-components/src/layout/Page.tsx +++ b/scm-ui/ui-components/src/layout/Page.tsx @@ -28,6 +28,13 @@ const PageActionContainer = styled.div` `; export default class Page extends React.Component { + componentDidUpdate() { + const { title } = this.props; + if (document.title !== title) { + document.title = title; + } + } + render() { const { error } = this.props; return (