mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:47:56 +08:00
Merge pull request #10766 from thinkingc/fix-form-lazyEmitChange
fix: Form组件的formLazyChange针对监听生效
This commit is contained in:
commit
577413859d
@ -507,7 +507,8 @@ export default class Form extends React.Component<FormProps, object> {
|
|||||||
this.beforePageUnload = this.beforePageUnload.bind(this);
|
this.beforePageUnload = this.beforePageUnload.bind(this);
|
||||||
this.formItemDispatchEvent = this.formItemDispatchEvent.bind(this);
|
this.formItemDispatchEvent = this.formItemDispatchEvent.bind(this);
|
||||||
|
|
||||||
const {store, canAccessSuperData, persistData, simpleMode} = props;
|
const {store, canAccessSuperData, persistData, simpleMode, formLazyChange} =
|
||||||
|
props;
|
||||||
|
|
||||||
store.setCanAccessSuperData(canAccessSuperData !== false);
|
store.setCanAccessSuperData(canAccessSuperData !== false);
|
||||||
store.setPersistData(persistData);
|
store.setPersistData(persistData);
|
||||||
@ -538,7 +539,10 @@ export default class Form extends React.Component<FormProps, object> {
|
|||||||
() => store.initedAt,
|
() => store.initedAt,
|
||||||
() => {
|
() => {
|
||||||
store.inited &&
|
store.inited &&
|
||||||
this.lazyEmitChange(!!this.props.submitOnChange, true);
|
(formLazyChange === false ? this.emitChange : this.lazyEmitChange)(
|
||||||
|
!!this.props.submitOnChange,
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user