Skip to content

Commit

Permalink
fix(core): fix input change trigger order
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Oct 10, 2020
1 parent 67e5a31 commit 1cebca6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/externals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<FormilyCore.FieldProps>) => {
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) {
Expand Down

0 comments on commit 1cebca6

Please sign in to comment.