initialValues

Specification

An object that describes initial values of the fields.

Definition

type InitialValues = {
  [fieldName?: string]: any,
  [fieldGroup?: string]: {
    [fieldName?: string]: any,
  },
}

Priority

There are multiple way to affect initial value of a field. The first value found in the list below will be used as the initial value for a field (sorted by priority):

  1. Form.props.initialValues

  2. Field.props.initialValue

  3. FieldClass.initialValue

Example

Field's group must also be reflected in the nesting of initialValues keys.

Last updated