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

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

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -