@formio/js 5.0.0-dev.5889.5851e22 → 5.0.0-dev.5893.c6cb848
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/Changelog.md +1 -0
- 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/Webform.js +2 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +3 -0
- package/lib/cjs/components/select/Select.js +1 -1
- package/lib/mjs/Webform.js +1 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +3 -0
- package/lib/mjs/components/select/Select.js +1 -1
- package/package.json +1 -1
package/lib/cjs/Webform.js
CHANGED
|
@@ -738,7 +738,8 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
738
738
|
this.emit(restoreDraft ? "restoreDraftError" : "saveDraftError", errDetails || errorMessage);
|
|
739
739
|
}
|
|
740
740
|
saveDraft() {
|
|
741
|
-
|
|
741
|
+
var _a;
|
|
742
|
+
if (!this.draftEnabled || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.component.reference) === false) {
|
|
742
743
|
return;
|
|
743
744
|
}
|
|
744
745
|
if (!this.formio) {
|
|
@@ -693,6 +693,9 @@ class NestedComponent extends Field_1.default {
|
|
|
693
693
|
if (!instance) {
|
|
694
694
|
return;
|
|
695
695
|
}
|
|
696
|
+
if (!instance.component.path) {
|
|
697
|
+
instance.component.path = component.path;
|
|
698
|
+
}
|
|
696
699
|
instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
|
|
697
700
|
if (instance.processOwnValidation) {
|
|
698
701
|
scope.noRecurse = true;
|
|
@@ -1239,7 +1239,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
lodash_1.default.set(submission.metadata.selectData, this.path, templateData);
|
|
1241
1241
|
}
|
|
1242
|
-
if (flags.resetValue && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission)) {
|
|
1242
|
+
if (flags.resetValue && ((_b = this.root) === null || _b === void 0 ? void 0 : _b.submission) && !this.options.readOnly) {
|
|
1243
1243
|
const submission = this.root.submission;
|
|
1244
1244
|
if (!submission.metadata) {
|
|
1245
1245
|
submission.metadata = {};
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -742,7 +742,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
742
742
|
this.emit(restoreDraft ? "restoreDraftError" : "saveDraftError", errDetails || errorMessage);
|
|
743
743
|
}
|
|
744
744
|
saveDraft() {
|
|
745
|
-
if (!this.draftEnabled) {
|
|
745
|
+
if (!this.draftEnabled || this.parent?.component.reference === false) {
|
|
746
746
|
return;
|
|
747
747
|
}
|
|
748
748
|
if (!this.formio) {
|
|
@@ -688,6 +688,9 @@ export default class NestedComponent extends Field {
|
|
|
688
688
|
if (!instance) {
|
|
689
689
|
return;
|
|
690
690
|
}
|
|
691
|
+
if (!instance.component.path) {
|
|
692
|
+
instance.component.path = component.path;
|
|
693
|
+
}
|
|
691
694
|
instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
|
|
692
695
|
if (instance.processOwnValidation) {
|
|
693
696
|
scope.noRecurse = true;
|
|
@@ -1267,7 +1267,7 @@ export default class SelectComponent extends ListComponent {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
_.set(submission.metadata.selectData, this.path, templateData);
|
|
1269
1269
|
}
|
|
1270
|
-
if (flags.resetValue && this.root?.submission) {
|
|
1270
|
+
if (flags.resetValue && this.root?.submission && !this.options.readOnly) {
|
|
1271
1271
|
const submission = this.root.submission;
|
|
1272
1272
|
if (!submission.metadata) {
|
|
1273
1273
|
submission.metadata = {};
|