@formio/js 5.0.0-dev.5603.8554c0d → 5.0.0-dev.5604.02ffada
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.
|
@@ -580,8 +580,9 @@ class FormComponent extends Component_1.default {
|
|
|
580
580
|
this.subForm.triggerSaveDraft.cancel();
|
|
581
581
|
}
|
|
582
582
|
const isAlreadySubmitted = submission && submission._id && submission.form;
|
|
583
|
+
const isDraftSubmission = this.options.saveDraft && submission.state === 'draft';
|
|
583
584
|
// This submission has already been submitted, so just return the reference data.
|
|
584
|
-
if (isAlreadySubmitted && !((_c = this.subForm) === null || _c === void 0 ? void 0 : _c.wizard)) {
|
|
585
|
+
if (isAlreadySubmitted && !((_c = this.subForm) === null || _c === void 0 ? void 0 : _c.wizard) && !isDraftSubmission) {
|
|
585
586
|
this.dataValue = submission;
|
|
586
587
|
return Promise.resolve(this.dataValue);
|
|
587
588
|
}
|
|
@@ -573,8 +573,9 @@ export default class FormComponent extends Component {
|
|
|
573
573
|
this.subForm.triggerSaveDraft.cancel();
|
|
574
574
|
}
|
|
575
575
|
const isAlreadySubmitted = submission && submission._id && submission.form;
|
|
576
|
+
const isDraftSubmission = this.options.saveDraft && submission.state === 'draft';
|
|
576
577
|
// This submission has already been submitted, so just return the reference data.
|
|
577
|
-
if (isAlreadySubmitted && !this.subForm?.wizard) {
|
|
578
|
+
if (isAlreadySubmitted && !this.subForm?.wizard && !isDraftSubmission) {
|
|
578
579
|
this.dataValue = submission;
|
|
579
580
|
return Promise.resolve(this.dataValue);
|
|
580
581
|
}
|