Skip to content

Commit

Permalink
FIO-8111 figed saveDraft Trigger for nested forms
Browse files Browse the repository at this point in the history
  • Loading branch information
HannaKurban committed Mar 28, 2024
1 parent 3901e86 commit 57d8358
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 57d8358

Please sign in to comment.