From 1cebca66f46792396af756b84f6b197f19783b37 Mon Sep 17 00:00:00 2001 From: janrywang Date: Sat, 10 Oct 2020 11:55:23 +0800 Subject: [PATCH] fix(core): fix input change trigger order --- packages/core/src/externals.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/externals.ts b/packages/core/src/externals.ts index b1dd45355d7..d5cab2efca1 100644 --- a/packages/core/src/externals.ts +++ b/packages/core/src/externals.ts @@ -961,13 +961,13 @@ export const createFormExternals = ( field = input } function setValue(...values: any[]) { - heart.publish(LifeCycleTypes.ON_FIELD_INPUT_CHANGE, field) - heart.publish(LifeCycleTypes.ON_FORM_INPUT_CHANGE, form) field.setState((state: IFieldState) => { state.value = values[0] state.values = values state.inputed = true }) + heart.publish(LifeCycleTypes.ON_FIELD_INPUT_CHANGE, field) + heart.publish(LifeCycleTypes.ON_FORM_INPUT_CHANGE, form) } function removeValue(key: string | number) {