mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 05:31:22 -03:30
Only reload details whe navigating to details from another tab
This commit is contained in:
parent
3b17170533
commit
7039f82d15
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user