@formio/js 5.1.0-dev.6039.a838d78 → 5.1.0-dev.6040.debc859

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.
@@ -1623,7 +1623,7 @@ class WebformBuilder extends Component_1.default {
1623
1623
  info.type);
1624
1624
  }
1625
1625
  hasEditTabs(type) {
1626
- const editTabs = (0, formUtils_1.getComponent)(Components_1.default.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
1626
+ const editTabs = (0, formUtils_1.getComponent)(Components_1.default.components[type].editForm().components, 'tabs', true).components;
1627
1627
  const hiddenEditTabs = lodash_1.default.filter(lodash_1.default.get(this.options, `editForm.${type}`, []), 'ignore');
1628
1628
  return lodash_1.default.intersectionBy(editTabs, hiddenEditTabs, 'key').length !== editTabs.length;
1629
1629
  }
@@ -592,20 +592,16 @@ class FormComponent extends Component_1.default {
592
592
  return Promise.resolve(this.dataValue);
593
593
  }
594
594
  // we need to load a hidden form (when clearOnHide is disabled) in order to get and submit (if needed) its data
595
- const loadHiddenForm = !this.subForm && !this.component.clearOnHide;
596
- if ((this.isSubFormLazyLoad() || loadHiddenForm) && !this.subFormLoading) {
595
+ const loadHiddenForm = !this.component.clearOnHide;
596
+ if ((this.isSubFormLazyLoad() || loadHiddenForm) && !this.subFormLoading && !this.subForm) {
597
597
  return this.createSubForm(true, true)
598
- .then(this.submitSubForm(false))
599
- .then(() => {
600
- return this.dataValue;
601
- })
598
+ .then(() => this.submitSubForm(false))
599
+ .then(() => this.dataValue)
602
600
  .then(() => super.beforeSubmit());
603
601
  }
604
602
  else {
605
603
  return this.submitSubForm(false)
606
- .then(() => {
607
- return this.dataValue;
608
- })
604
+ .then(() => this.dataValue)
609
605
  .then(() => super.beforeSubmit());
610
606
  }
611
607
  }
@@ -1626,7 +1626,7 @@ export default class WebformBuilder extends Component {
1626
1626
  info.type);
1627
1627
  }
1628
1628
  hasEditTabs(type) {
1629
- const editTabs = getComponent(Components.components[type === 'custom' ? 'unknown' : type].editForm().components, 'tabs', true).components;
1629
+ const editTabs = getComponent(Components.components[type].editForm().components, 'tabs', true).components;
1630
1630
  const hiddenEditTabs = _.filter(_.get(this.options, `editForm.${type}`, []), 'ignore');
1631
1631
  return _.intersectionBy(editTabs, hiddenEditTabs, 'key').length !== editTabs.length;
1632
1632
  }
@@ -584,20 +584,16 @@ export default class FormComponent extends Component {
584
584
  return Promise.resolve(this.dataValue);
585
585
  }
586
586
  // we need to load a hidden form (when clearOnHide is disabled) in order to get and submit (if needed) its data
587
- const loadHiddenForm = !this.subForm && !this.component.clearOnHide;
588
- if ((this.isSubFormLazyLoad() || loadHiddenForm) && !this.subFormLoading) {
587
+ const loadHiddenForm = !this.component.clearOnHide;
588
+ if ((this.isSubFormLazyLoad() || loadHiddenForm) && !this.subFormLoading && !this.subForm) {
589
589
  return this.createSubForm(true, true)
590
- .then(this.submitSubForm(false))
591
- .then(() => {
592
- return this.dataValue;
593
- })
590
+ .then(() => this.submitSubForm(false))
591
+ .then(() => this.dataValue)
594
592
  .then(() => super.beforeSubmit());
595
593
  }
596
594
  else {
597
595
  return this.submitSubForm(false)
598
- .then(() => {
599
- return this.dataValue;
600
- })
596
+ .then(() => this.dataValue)
601
597
  .then(() => super.beforeSubmit());
602
598
  }
603
599
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6039.a838d78",
3
+ "version": "5.1.0-dev.6040.debc859",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {