mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
chore: form 下发 onFlushForm 方便自定义组件拿取最新数据 (#10976)
This commit is contained in:
parent
4372a8330c
commit
9002363c66
@ -507,6 +507,7 @@ export default class Form extends React.Component<FormProps, object> {
|
||||
this.blockRouting = this.blockRouting.bind(this);
|
||||
this.beforePageUnload = this.beforePageUnload.bind(this);
|
||||
this.formItemDispatchEvent = this.formItemDispatchEvent.bind(this);
|
||||
this.flush = this.flush.bind(this);
|
||||
|
||||
const {store, canAccessSuperData, persistData, simpleMode, formLazyChange} =
|
||||
props;
|
||||
@ -1960,7 +1961,8 @@ export default class Form extends React.Component<FormProps, object> {
|
||||
removeHook: this.removeHook,
|
||||
renderFormItems: this.renderFormItems,
|
||||
formItemDispatchEvent: this.formItemDispatchEvent,
|
||||
formPristine: form.pristine
|
||||
formPristine: form.pristine,
|
||||
onFlushForm: this.flush
|
||||
// value: (control as any)?.name
|
||||
// ? getVariable(form.data, (control as any)?.name, canAccessSuperData)
|
||||
// : (control as any)?.value,
|
||||
|
@ -774,7 +774,7 @@ test('Renderer:input-table formula', async () => {
|
||||
|
||||
fireEvent.change(dollor!, {target: {value: '22'}});
|
||||
|
||||
await wait(400);
|
||||
await wait(800);
|
||||
|
||||
const inputs = container.querySelectorAll('input[name=score]');
|
||||
expect(inputs.length).toBe(3);
|
||||
|
Loading…
Reference in New Issue
Block a user