@formio/js 5.1.0-dev.6045.42f9edf → 5.1.0-dev.6047.b09c4ee
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 +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/WebformBuilder.js +0 -4
- package/lib/cjs/components/form/Form.js +6 -0
- package/lib/mjs/WebformBuilder.js +0 -4
- package/lib/mjs/components/form/Form.js +6 -0
- package/package.json +1 -1
@@ -1623,10 +1623,6 @@ class WebformBuilder extends Component_1.default {
|
|
1623
1623
|
info.type);
|
1624
1624
|
}
|
1625
1625
|
hasEditTabs(type) {
|
1626
|
-
// If the component type does not exist then it has no edit tabs
|
1627
|
-
if (!Components_1.default.components[type]) {
|
1628
|
-
return false;
|
1629
|
-
}
|
1630
1626
|
const editTabs = (0, formUtils_1.getComponent)(Components_1.default.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
|
1631
1627
|
const hiddenEditTabs = lodash_1.default.filter(lodash_1.default.get(this.options, `editForm.${type}`, []), 'ignore');
|
1632
1628
|
return lodash_1.default.intersectionBy(editTabs, hiddenEditTabs, 'key').length !== editTabs.length;
|
@@ -392,6 +392,12 @@ class FormComponent extends Component_1.default {
|
|
392
392
|
// Iterate through every component and hide the submit button.
|
393
393
|
(0, utils_1.eachComponent)(form.components, (component) => {
|
394
394
|
this.hideSubmitButton(component);
|
395
|
+
if (component.validateWhenHidden) {
|
396
|
+
this.component.validateWhenHidden = true;
|
397
|
+
// Change original component as well, so it won't cause any custom logic to be continuously triggered
|
398
|
+
// because the original component does not have this property
|
399
|
+
this.originalComponent.validateWhenHidden = true;
|
400
|
+
}
|
395
401
|
});
|
396
402
|
// If the subform is already created then destroy the old one.
|
397
403
|
if (this.subForm) {
|
@@ -1626,10 +1626,6 @@ export default class WebformBuilder extends Component {
|
|
1626
1626
|
info.type);
|
1627
1627
|
}
|
1628
1628
|
hasEditTabs(type) {
|
1629
|
-
// If the component type does not exist then it has no edit tabs
|
1630
|
-
if (!Components.components[type]) {
|
1631
|
-
return false;
|
1632
|
-
}
|
1633
1629
|
const editTabs = getComponent(Components.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
|
1634
1630
|
const hiddenEditTabs = _.filter(_.get(this.options, `editForm.${type}`, []), 'ignore');
|
1635
1631
|
return _.intersectionBy(editTabs, hiddenEditTabs, 'key').length !== editTabs.length;
|
@@ -386,6 +386,12 @@ export default class FormComponent extends Component {
|
|
386
386
|
// Iterate through every component and hide the submit button.
|
387
387
|
eachComponent(form.components, (component) => {
|
388
388
|
this.hideSubmitButton(component);
|
389
|
+
if (component.validateWhenHidden) {
|
390
|
+
this.component.validateWhenHidden = true;
|
391
|
+
// Change original component as well, so it won't cause any custom logic to be continuously triggered
|
392
|
+
// because the original component does not have this property
|
393
|
+
this.originalComponent.validateWhenHidden = true;
|
394
|
+
}
|
389
395
|
});
|
390
396
|
// If the subform is already created then destroy the old one.
|
391
397
|
if (this.subForm) {
|