FormFieldThis is a React component
SourceWrapper around Field from react-final-form that determines the widget to use based on the field.
Must be used within a ViewModelForm
.
If component
, render
or children
are passed they will be used instead of selecting a widget
based on the field type.
If field
is passed through defaultValue
will be populated unless otherwise specified. Note that
if the same field is specified in initialValues
in Form then that takes precedence.
Parameter | Type | Description | |
---|---|---|---|
* | props.field | any | The field to get name, widget and default value from. If not specified you must provide one of
|
* | props.name | any | The name of the field. If not specified defaults to |
* | props.widgetProps | any | Optional props to pass through to the inferred widget. This is only used if |
* | ...rest | fieldProps|fieldProps | Any other props to pass through to Field |