@formio/js 5.1.0-dev.6048.569bfc1 → 5.1.0-dev.6048.c77fe06
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +1 -1
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Wizard.js +5 -2
- package/lib/mjs/Wizard.js +4 -1
- package/package.json +1 -1
package/lib/cjs/Wizard.js
CHANGED
@@ -726,10 +726,13 @@ class Wizard extends Webform_1.default {
|
|
726
726
|
}
|
727
727
|
}
|
728
728
|
validateCurrentPage(flags = {}) {
|
729
|
-
var _a, _b;
|
729
|
+
var _a, _b, _c, _d;
|
730
730
|
const components = (_a = this.currentPage) === null || _a === void 0 ? void 0 : _a.components.map((component) => component.component);
|
731
731
|
// Accessing the parent ensures the right instance (whether it's the parent Wizard or a nested Wizard) performs its validation
|
732
|
-
|
732
|
+
if ((_b = this.currentPage) === null || _b === void 0 ? void 0 : _b.parent) {
|
733
|
+
return (_c = this.currentPage) === null || _c === void 0 ? void 0 : _c.parent.validateComponents(components, this.root.data, flags);
|
734
|
+
}
|
735
|
+
return (_d = this.currentPage) === null || _d === void 0 ? void 0 : _d.validateComponents(components, this.root ? this.root.data : this.data, flags);
|
733
736
|
}
|
734
737
|
emitPrevPage() {
|
735
738
|
this.emit('prevPage', { page: this.page, submission: this.submission });
|
package/lib/mjs/Wizard.js
CHANGED
@@ -718,7 +718,10 @@ export default class Wizard extends Webform {
|
|
718
718
|
validateCurrentPage(flags = {}) {
|
719
719
|
const components = this.currentPage?.components.map((component) => component.component);
|
720
720
|
// Accessing the parent ensures the right instance (whether it's the parent Wizard or a nested Wizard) performs its validation
|
721
|
-
|
721
|
+
if (this.currentPage?.parent) {
|
722
|
+
return this.currentPage?.parent.validateComponents(components, this.root.data, flags);
|
723
|
+
}
|
724
|
+
return this.currentPage?.validateComponents(components, this.root ? this.root.data : this.data, flags);
|
722
725
|
}
|
723
726
|
emitPrevPage() {
|
724
727
|
this.emit('prevPage', { page: this.page, submission: this.submission });
|