@formio/js 5.1.0-dev.6068.894e88e → 5.1.0-dev.6068.e295b11

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.
@@ -165,7 +165,7 @@ declare class Component extends Element {
165
165
  get componentsMap(): object;
166
166
  parentShouldConditionallyClear(): boolean;
167
167
  parentConditionallyHidden(): boolean;
168
- parentHidden(): boolean;
168
+ parentDefaultHidden(): boolean;
169
169
  set data(value: any);
170
170
  get data(): any;
171
171
  mergeSchema(component?: {}): any;
@@ -479,7 +479,7 @@ class Component extends Element_1.default {
479
479
  }
480
480
  return false;
481
481
  }
482
- parentHidden() {
482
+ parentDefaultHidden() {
483
483
  let currentParent = this.parent;
484
484
  while (currentParent) {
485
485
  if (currentParent.component.hidden) {
@@ -701,7 +701,9 @@ class Component extends Element_1.default {
701
701
  return this._logicallyHidden;
702
702
  }
703
703
  shouldConditionallyClearOnPristine() {
704
- return !this.parentHidden();
704
+ // If the form is pristine, we should NOT clear the value of a conditionally hidden child component
705
+ // of a conditionally hidden layout component that defaults to hidden using the "hidden" property.
706
+ return !this.parentDefaultHidden();
705
707
  }
706
708
  shouldConditionallyClear() {
707
709
  // Skip if this component has clearOnHide set to false.
@@ -165,7 +165,7 @@ declare class Component extends Element {
165
165
  get componentsMap(): object;
166
166
  parentShouldConditionallyClear(): boolean;
167
167
  parentConditionallyHidden(): boolean;
168
- parentHidden(): boolean;
168
+ parentDefaultHidden(): boolean;
169
169
  set data(value: any);
170
170
  get data(): any;
171
171
  mergeSchema(component?: {}): any;
@@ -443,7 +443,7 @@ export default class Component extends Element {
443
443
  }
444
444
  return false;
445
445
  }
446
- parentHidden() {
446
+ parentDefaultHidden() {
447
447
  let currentParent = this.parent;
448
448
  while (currentParent) {
449
449
  if (currentParent.component.hidden) {
@@ -665,7 +665,9 @@ export default class Component extends Element {
665
665
  return this._logicallyHidden;
666
666
  }
667
667
  shouldConditionallyClearOnPristine() {
668
- return !this.parentHidden();
668
+ // If the form is pristine, we should NOT clear the value of a conditionally hidden child component
669
+ // of a conditionally hidden layout component that defaults to hidden using the "hidden" property.
670
+ return !this.parentDefaultHidden();
669
671
  }
670
672
  shouldConditionallyClear() {
671
673
  // Skip if this component has clearOnHide set to false.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6068.894e88e",
3
+ "version": "5.1.0-dev.6068.e295b11",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {