@formio/js 5.0.0-dev.5951.84e7c13 → 5.0.0-dev.5954.7e72629

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.
@@ -144,6 +144,8 @@ class FormComponent extends Component_1.default {
144
144
  options.events = this.createEmitter();
145
145
  // Make sure to not show the submit button in wizards in the nested forms.
146
146
  lodash_1.default.set(options, 'buttonSettings.showSubmit', false);
147
+ // Set the parent option to the subform so those references are stable when the subform is created
148
+ options.parent = this;
147
149
  if (!this.options) {
148
150
  return options;
149
151
  }
@@ -393,12 +395,11 @@ class FormComponent extends Component_1.default {
393
395
  return (new Form_1.default(form, this.getSubOptions())).ready.then((instance) => {
394
396
  this.subForm = instance;
395
397
  this.subForm.currentForm = this;
398
+ this.subForm.parentVisible = this.visible;
396
399
  const componentsMap = this.componentsMap;
397
400
  const formComponentsMap = this.subForm.componentsMap;
398
401
  lodash_1.default.assign(componentsMap, formComponentsMap);
399
402
  this.component.components = this.subForm.components.map((comp) => comp.component);
400
- this.subForm.parent = this;
401
- this.subForm.parentVisible = this.visible;
402
403
  this.subForm.on('change', () => {
403
404
  if (this.subForm) {
404
405
  this.dataValue = this.subForm.getValue();
@@ -138,6 +138,8 @@ export default class FormComponent extends Component {
138
138
  options.events = this.createEmitter();
139
139
  // Make sure to not show the submit button in wizards in the nested forms.
140
140
  _.set(options, 'buttonSettings.showSubmit', false);
141
+ // Set the parent option to the subform so those references are stable when the subform is created
142
+ options.parent = this;
141
143
  if (!this.options) {
142
144
  return options;
143
145
  }
@@ -389,12 +391,11 @@ export default class FormComponent extends Component {
389
391
  return (new Form(form, this.getSubOptions())).ready.then((instance) => {
390
392
  this.subForm = instance;
391
393
  this.subForm.currentForm = this;
394
+ this.subForm.parentVisible = this.visible;
392
395
  const componentsMap = this.componentsMap;
393
396
  const formComponentsMap = this.subForm.componentsMap;
394
397
  _.assign(componentsMap, formComponentsMap);
395
398
  this.component.components = this.subForm.components.map((comp) => comp.component);
396
- this.subForm.parent = this;
397
- this.subForm.parentVisible = this.visible;
398
399
  this.subForm.on('change', () => {
399
400
  if (this.subForm) {
400
401
  this.dataValue = this.subForm.getValue();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5951.84e7c13",
3
+ "version": "5.0.0-dev.5954.7e72629",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {