From 7039f82d15a45716af16308dc7480c967bfe4aef Mon Sep 17 00:00:00 2001 From: Alex Corey Date: Tue, 9 Jul 2019 13:38:52 -0400 Subject: [PATCH] Only reload details whe navigating to details from another tab --- awx/ui_next/src/screens/Organization/Organization.jsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/awx/ui_next/src/screens/Organization/Organization.jsx b/awx/ui_next/src/screens/Organization/Organization.jsx index cffca89d56..9727bdc411 100644 --- a/awx/ui_next/src/screens/Organization/Organization.jsx +++ b/awx/ui_next/src/screens/Organization/Organization.jsx @@ -43,13 +43,10 @@ class Organization extends Component { async componentDidUpdate(prevProps) { const { location, match } = this.props; const url = `/organizations/${match.params.id}/`; - const tabs = ['details', 'access', 'teams', 'notifications', 'edit'].map( - tab => `${url}${tab}` - ); - const didNavigateFromTab = tabs.includes(prevProps.location.pathname); + if ( + prevProps.location.pathname.startsWith(url) && prevProps.location !== location && - didNavigateFromTab && location.pathname === `${url}details` ) { await this.loadOrganization();