@formio/js 5.1.0-dev.6112.eca5845 → 5.1.0-dev.6113.1a173e6
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 +3 -3
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +3 -3
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/components/_classes/component/Component.js +1 -1
- package/lib/cjs/components/_classes/input/Input.js +1 -1
- package/lib/cjs/components/textfield/TextField.js +6 -1
- package/lib/mjs/components/_classes/component/Component.js +1 -1
- package/lib/mjs/components/_classes/input/Input.js +1 -1
- package/lib/mjs/components/textfield/TextField.js +6 -1
- package/package.json +1 -1
@@ -740,7 +740,7 @@ class Component extends Element_1.default {
|
|
740
740
|
this._conditionallyClear = true;
|
741
741
|
return this._conditionallyClear;
|
742
742
|
}
|
743
|
-
this._conditionallyClear = this.parentShouldConditionallyClear();
|
743
|
+
this._conditionallyClear = this.hasSetValue ? false : this.parentShouldConditionallyClear();
|
744
744
|
return this._conditionallyClear;
|
745
745
|
}
|
746
746
|
/**
|
@@ -118,7 +118,7 @@ class Input extends Multivalue_1.default {
|
|
118
118
|
}
|
119
119
|
const info = this.inputInfo;
|
120
120
|
info.attr = info.attr || {};
|
121
|
-
info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(value)))
|
121
|
+
info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(this.isMultipleMasksField ? value.value : value)))
|
122
122
|
.replace(/"/g, '"');
|
123
123
|
const valueMask = this.component.inputMask;
|
124
124
|
const displayMask = this.component.displayMask;
|
@@ -130,7 +130,12 @@ class TextFieldComponent extends Input_1.default {
|
|
130
130
|
// If no value is provided, then set the defaultValue.
|
131
131
|
if (!value.value) {
|
132
132
|
const defaultValue = flags.noDefault ? this.emptyValue : this.defaultValue;
|
133
|
-
|
133
|
+
if (Array.isArray(defaultValue)) {
|
134
|
+
value.value = lodash_1.default.isObject(defaultValue[0]) ? defaultValue[0].value : defaultValue;
|
135
|
+
}
|
136
|
+
else {
|
137
|
+
value.value = lodash_1.default.isObject(defaultValue) ? defaultValue.value : defaultValue;
|
138
|
+
}
|
134
139
|
}
|
135
140
|
return value;
|
136
141
|
}
|
@@ -704,7 +704,7 @@ export default class Component extends Element {
|
|
704
704
|
this._conditionallyClear = true;
|
705
705
|
return this._conditionallyClear;
|
706
706
|
}
|
707
|
-
this._conditionallyClear = this.parentShouldConditionallyClear();
|
707
|
+
this._conditionallyClear = this.hasSetValue ? false : this.parentShouldConditionallyClear();
|
708
708
|
return this._conditionallyClear;
|
709
709
|
}
|
710
710
|
/**
|
@@ -113,7 +113,7 @@ export default class Input extends Multivalue {
|
|
113
113
|
}
|
114
114
|
const info = this.inputInfo;
|
115
115
|
info.attr = info.attr || {};
|
116
|
-
info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(value)))
|
116
|
+
info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(this.isMultipleMasksField ? value.value : value)))
|
117
117
|
.replace(/"/g, '"');
|
118
118
|
const valueMask = this.component.inputMask;
|
119
119
|
const displayMask = this.component.displayMask;
|
@@ -114,7 +114,12 @@ export default class TextFieldComponent extends Input {
|
|
114
114
|
// If no value is provided, then set the defaultValue.
|
115
115
|
if (!value.value) {
|
116
116
|
const defaultValue = flags.noDefault ? this.emptyValue : this.defaultValue;
|
117
|
-
|
117
|
+
if (Array.isArray(defaultValue)) {
|
118
|
+
value.value = _.isObject(defaultValue[0]) ? defaultValue[0].value : defaultValue;
|
119
|
+
}
|
120
|
+
else {
|
121
|
+
value.value = _.isObject(defaultValue) ? defaultValue.value : defaultValue;
|
122
|
+
}
|
118
123
|
}
|
119
124
|
return value;
|
120
125
|
}
|