How to use the @uform/core.isStateModel function in @uform/core

To help you get started, we’ve selected a few @uform/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / uform / packages / react / src / hooks / useFormEffects.ts View on Github external
dispatch.lazy(type, () => {
        return isStateModel(payload) ? payload.getState() : payload
      })
    })
github alibaba / uform / packages / react / src / hooks / useForm.ts View on Github external
dispatch.lazy(type, () => {
            return isStateModel(payload) ? payload.getState() : payload
          })
          if (type === LifeCycleTypes.ON_FORM_INPUT_CHANGE) {
github alibaba / uform / packages / react / src / hooks / useForm.ts View on Github external
({ type, payload }: { type: string; payload: IModel }) => {
          dispatch.lazy(type, () => {
            return isStateModel(payload) ? payload.getState() : payload
          })
          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 })
          }
        }
      ),