1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-27 08:31:20 +02:00

Fix: ViewTitle update on board change

This commit is contained in:
Chen-I Lim 2020-10-27 13:59:37 -07:00
parent 48719f16ce
commit 3ff889ebab

View File

@ -29,6 +29,16 @@ class ViewTitle extends React.Component<Props, State> {
return true
}
static getDerivedStateFromProps(nextProps: Props, prevState: State) {
if (prevState.title !== nextProps.board.title) {
return {
title: nextProps.board.title,
}
}
return null
}
constructor(props: Props) {
super(props)
this.state = {title: props.board.title}