diff --git a/src/Wizard.js b/src/Wizard.js index 35c800f497..7f76fd31a2 100644 --- a/src/Wizard.js +++ b/src/Wizard.js @@ -218,7 +218,7 @@ export default class Wizard extends Webform { if (this.component.key) { ctx.panels.map(panel => { - if (panel.key === this.component.key) { + if (panel.key === this.component.key && panel.title === this.component.title) { this.currentPanel = panel; ctx.wizardPageTooltip = this.getFormattedTooltip(panel.tooltip); } @@ -1013,6 +1013,9 @@ export default class Wizard extends Webform { currentPanels = this.pages.map(page => page.component.key); this.establishPages(); panels = this.pages.map(page => page.component.key); + if (panels.length !== currentPanels.length) { + this.setPage(this.pages.findIndex(page => page.component.title === this.currentPanel.components[0].label)); + } } else { currentPanels = this.currentPanels || this.pages.map(page => page.component.key); @@ -1080,7 +1083,7 @@ export default class Wizard extends Webform { errors = [...errors, ...subWizard.errors] } }) - }; + } return super.showErrors(errors, triggerEvent) } diff --git a/src/components/selectboxes/SelectBoxes.js b/src/components/selectboxes/SelectBoxes.js index 6919738b63..85a8198259 100644 --- a/src/components/selectboxes/SelectBoxes.js +++ b/src/components/selectboxes/SelectBoxes.js @@ -307,7 +307,7 @@ export default class SelectBoxesComponent extends RadioComponent { return super.setCustomValidity(_.filter(messages, (message) => message.ruleName !=='invalidValueProperty'), dirty, external); } else { return super.setCustomValidity(messages, dirty, external); - }; + } } validateValueAvailability(setting, value) {