Skip to content

can't get fields value in onValuesChange callback when native input. #528

@senwong

Description

@senwong

codesandbox demo

I want use form.getFieldsValue function in onValuesChange callback. But When typing in the input element,form.getFieldsValue can not get the value.
image

But when changing field value by form.setFieldsValue function, in onValuesChange callback can get field value. Is this by design?
image

In createBaseForm.js
in this.setFieldsValue function, onValuesChange callback is invoked after this.setFields.

if (onValuesChange) {

image

But in this.onCollect function, onValuesChange callback is invoked before this.setFields. Is this by design?

onCollect(name_, action, ...args) {

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions