Redux-form: How can I get the value of a name property passed into a Field via FieldArray? -


using fieldarray redux-form, name gets passed field this:

<field      name={`${obj}.description`}     component={textfield}     hinttext={`${obj}.description`} /> 

the name string value "myarray[0].description".

obviously, redux-form performs lookup of property, in array element display in field. how can same? want display value of myarray[0].description property (not inside field). stateless component has, however, fields object contains number of elements not array.

the answer appears nested fields:

<field name={`${obj}.description`} component={textfield} hinttext={ <field name={`${obj}.description`} component={(props) => { return ( <div> <span>{props.input.value}</span> </div> ) }}/> } />


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -