Forms
In order to facilitate data binding we use Ant Design Form component and utilities. On top of that we provide a Field
component that automatically renders a correct component depending on the property type (e.g. DatePicker
, Select
, etc.). See the following example:
<Field
entityName={Car.NAME}
propertyName="manufacturer"
form={this.props.form}
formItemOpts={{ style: { marginBottom: "12px" } }}
getFieldDecoratorOpts={{
rules: [{ required: true }]
}}
componentProps= {{
maxLength: 4
}}
/>
You can customize underlying components, validation rules and binding using getFieldDecoratorOpts
and componentProps
properties.
API: FieldProps.