Island: Set correct default config tab on refresh

This commit is contained in:
Mike Salvatore 2021-07-14 14:27:17 -04:00
parent c0514e1359
commit 6acd9061a3
1 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,13 @@ class ConfigurePageComponent extends AuthComponent {
};
}
componentDidUpdate() {
if (!this.getSectionsOrder().includes(this.currentSection)) {
this.currentSection = this.getSectionsOrder()[0]
this.setState({selectedSection: this.currentSection})
}
}
getSectionsOrder() {
let islandMode = this.props.islandMode ? this.props.islandMode : 'advanced'
return CONFIGURATION_TABS_PER_MODE[islandMode];