From b36c8b5a4d4910b90b96cb91c0797c63c1619de3 Mon Sep 17 00:00:00 2001 From: oleg Date: Thu, 17 Dec 2015 00:32:52 +0300 Subject: [PATCH] reset show console button status on build change --- static/js/app/components/builds/view.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/js/app/components/builds/view.js b/static/js/app/components/builds/view.js index 54bfb19..0531024 100644 --- a/static/js/app/components/builds/view.js +++ b/static/js/app/components/builds/view.js @@ -33,6 +33,13 @@ define([ componentDidMount: function() { this.listenTo(buildStore, this.updateBuild); }, + componentWillReceiveProps: function(nextProps) { + // reset console status when go from build page to another build + // page (did mount and mount not called in this case) + if (Number(nextProps.params.id) !== this.state.build.id) { + this.setState({showConsole: this.getInitialState().showConsole}); + } + }, updateBuild: function(build) { if (build) { BuildActions.readAll({projectName: build.project.name});