From 57d8358891f3b923231b17809b240ac7dce2ff4f Mon Sep 17 00:00:00 2001 From: Hanna Kurban Date: Thu, 28 Mar 2024 16:02:06 +0300 Subject: [PATCH] FIO-8111 figed saveDraft Trigger for nested forms --- src/components/form/Form.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/form/Form.js b/src/components/form/Form.js index 15b4a15210..e5fa91a7ea 100644 --- a/src/components/form/Form.js +++ b/src/components/form/Form.js @@ -219,6 +219,12 @@ export default class FormComponent extends Component { if (this.options.preview) { options.preview = this.options.preview; } + if (this.options.saveDraft) { + options.saveDraft = this.options.saveDraft; + } + if (this.options.saveDraftThrottle) { + options.saveDraftThrottle = this.options.saveDraftThrottle; + } return options; } @@ -447,6 +453,8 @@ export default class FormComponent extends Component { this.subForm.nosubmit = true; this.subForm.root = this.root; this.subForm.localRoot = this.isNestedWizard ? this.localRoot : this.subForm; + this.subForm.draftEnabled = this.parent.draftEnabled; + this.subForm.savingDraft = this.parent.savingDraft; this.restoreValue(); this.valueChanged = this.hasSetValue; this.onChange();