redux-form-field-group
v2.0.1
Published
Pass data to dependent fields with redux-form@6
Downloads
5
Maintainers
Readme
redux-form-field-group
Pass data to dependent fields with
redux-form@6
This is deprecated as a feature to pass dependent field state has been added upstream to redux-form
as of [email protected]
.
Example: Passing a single property into some inner <Field>
s.
<FieldGroup name="inputs.measurementUnit">
<Field
name={`inputs.amount`}
component={renderInputAmount}
/>
</FieldGroup>
Example: Passing in multiple properties from a single object.
<FieldGroup name="inputs" expose={['measurementUnit', 'currency']}>
<Field
name="inputs.amount"
component={renderInputAmount}
/>
<Field
name="inputs.cost"
component={renderInputCost}
/>
</FieldGroup>
Additionally if you need to transform property keys then you can pass in { from, to }
to expose
.