diff --git a/src/renderers/Form/Combo.tsx b/src/renderers/Form/Combo.tsx index 1e565e7dc..cedd07f9e 100644 --- a/src/renderers/Form/Combo.tsx +++ b/src/renderers/Form/Combo.tsx @@ -734,7 +734,8 @@ export default class ComboControl extends React.Component { wrapWithPanel: false, mode: subFormMode, className: cx(`Combo-form`, formClassName), - lazyChange: false + lazyChange: false, + formLazyChange: false }, { index, @@ -907,7 +908,8 @@ export default class ComboControl extends React.Component { wrapWithPanel: false, mode: multiLine ? subFormMode : 'row', className: cx(`Combo-form`, formClassName), - lazyChange: false + lazyChange: false, + formLazyChange: false }, { index, @@ -1043,7 +1045,8 @@ export default class ComboControl extends React.Component { wrapWithPanel: false, mode: multiLine ? 'normal' : 'row', className: cx(`Combo-form`, formClassName), - lazyChange: false + lazyChange: false, + formLazyChange: false }, { disabled: disabled, diff --git a/src/renderers/Form/index.tsx b/src/renderers/Form/index.tsx index e651a52c0..f2319acd3 100644 --- a/src/renderers/Form/index.tsx +++ b/src/renderers/Form/index.tsx @@ -102,6 +102,8 @@ export interface FormProps extends RendererProps, FormSchema { saveFailed?: string; validateFailed?: string; }; + lazyChange?: boolean; + formLazyChange?: boolean; } export default class Form extends React.Component { @@ -152,7 +154,8 @@ export default class Form extends React.Component { 'onFailed', 'onFinished', 'canAccessSuperData', - 'lazyChange' + 'lazyChange', + 'formLazyChange' ]; hooks: { @@ -896,7 +899,8 @@ export default class Form extends React.Component { disabled, controlWidth, resolveDefinitions, - lazyChange + lazyChange, + formLazyChange } = props; const subProps = { @@ -912,7 +916,7 @@ export default class Form extends React.Component { disabled: disabled || (control as Schema).disabled || form.loading, btnDisabled: form.loading || form.validating, onAction: this.handleAction, - onChange: this.lazyHandleChange, + onChange: formLazyChange === false ? this.handleChange : this.lazyHandleChange, addHook: this.addHook, removeHook: this.removeHook, renderFormItems: this.renderFormItems,