Skip to content

Commit 28630d9

Browse files
committed
Use update_title in DocumentTitle component
1 parent eb427b0 commit 28630d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dash-renderer/src/components/core/DocumentTitle.react.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ import PropTypes from 'prop-types';
55
class DocumentTitle extends Component {
66
constructor(props) {
77
super(props);
8+
const {update_title} = props.config;
89
this.state = {
910
initialTitle: document.title,
11+
update_title: update_title,
1012
};
1113
}
1214

1315
UNSAFE_componentWillReceiveProps(props) {
1416
if (props.pendingCallbacks.length) {
15-
document.title = 'Updating...';
17+
document.title = this.state.update_title;
1618
} else {
1719
document.title = this.state.initialTitle;
1820
}
@@ -29,8 +31,10 @@ class DocumentTitle extends Component {
2931

3032
DocumentTitle.propTypes = {
3133
pendingCallbacks: PropTypes.array.isRequired,
34+
update_title: PropTypes.string,
3235
};
3336

3437
export default connect(state => ({
38+
config: state.config,
3539
pendingCallbacks: state.pendingCallbacks,
3640
}))(DocumentTitle);

0 commit comments

Comments
 (0)