aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmclaugh...@apache.org
Subject aurora git commit: Fix back button issue on Jobs page
Date Mon, 23 Oct 2017 16:41:18 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 063df5f7c -> 09298ceb1


Fix back button issue on Jobs page

Reviewed at https://reviews.apache.org/r/63197/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/09298ceb
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/09298ceb
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/09298ceb

Branch: refs/heads/master
Commit: 09298ceb1dc54491780481d8f7a1e45cf7091b42
Parents: 063df5f
Author: David McLaughlin <david@dmclaughlin.com>
Authored: Mon Oct 23 09:41:05 2017 -0700
Committer: David McLaughlin <david@dmclaughlin.com>
Committed: Mon Oct 23 09:41:05 2017 -0700

----------------------------------------------------------------------
 ui/src/main/js/components/Tabs.js | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/09298ceb/ui/src/main/js/components/Tabs.js
----------------------------------------------------------------------
diff --git a/ui/src/main/js/components/Tabs.js b/ui/src/main/js/components/Tabs.js
index a48c600..18c5171 100644
--- a/ui/src/main/js/components/Tabs.js
+++ b/ui/src/main/js/components/Tabs.js
@@ -24,6 +24,15 @@ export default class Tabs extends React.Component {
     }
   }
 
+  componentWillReceiveProps(nextProps) {
+    // Because this component manages its own state, we need to listen to changes to the
activeTab
+    // property - as the changes will not propagate without the component being remounted.
+    if (nextProps.activeTab !== this.props.activeTab &&
+        nextProps.activeTab !== this.state.activeTab) {
+      this.setState({active: nextProps.activeTab});
+    }
+  }
+
   render() {
     const that = this;
     const isActive = (t) => t.id === that.state.active;


Mime
View raw message