Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
if (type === LifeCycleTypes.ON_FORM_INPUT_CHANGE) {
if (props.onChange) {
props.onChange(
isStateModel(payload)
? payload.getState((state: IFormState) => state.values)
: {}
)
}
}
if (broadcast) {
broadcast.notify({ type, payload })
}
}
),
new FormLifeCycle(
LifeCycleTypes.ON_FORM_WILL_INIT,
(payload: IModel, form: IForm) => {
const actions = {
...form,
dispatch: form.notify
}
if (broadcast) {
broadcast.setContext(actions)
}
implementActions(actions)
}
)
],
onReset: props.onReset,
onSubmit: props.onSubmit,
onValidateFailed: props.onValidateFailed