title: React-Admin- ArrayInput/SimpleFormIterator- How to identify and pass current record to custom component
body: <p>Please I am having an issue with accessing and passing current record I am working with when there are more than one records in the Array:</p>
  <p>For example: see the json below: the whole array <em>salesoutdet</em> is being passed irrespective of which index I am on.</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;id&quot;:1
    &quot;salesoutdet&quot;: [
      {
        &quot;unitprice&quot;: 10,
        &quot;quantity&quot;: 5,
        &quot;total&quot;: 50
      },
      {
        &quot;unitprice&quot;: 2,
        &quot;quantity&quot;: 1,
        &quot;total&quot;: 2
      }
    ]
  }
  </code></pre>
  <p>See my ArrayInput below. The custom component (TotalField) is embedded. This should pass only the current record but it passing all the records of the SimpleFormIterator. Please how can I achieve this?</p>
  <pre class="lang-js prettyprint-override"><code>&lt;ArrayInput source=&quot;salesoutdet&quot; validate={[required()]}&gt;
    &lt;SimpleFormIterator&gt;
      &lt;ReferenceInput label=&quot;Sku&quot; source=&quot;sku&quot; reference=&quot;products&quot;&gt;
        &lt;SelectInput optionText=&quot;name&quot; /&gt;
      &lt;/ReferenceInput&gt;
      &lt;NumberInput label=&quot;Quantity&quot; source=&quot;quantity&quot; /&gt;
      &lt;NumberInput label=&quot;Unit Price&quot; source=&quot;unitprice&quot; /&gt;
  
      &lt;FormDataConsumer&gt;
        {({
          formData, // The whole form data
          scopedFormData, // The data for this item of the ArrayInput
          getSource, // A function to get the valid source inside an ArrayInput
          ...rest
        }) =&gt; {
          //console.log(`getSource: ${JSON.stringify(scopedFormData)}`)
          return scopedFormData ? &lt;TotalField source={getSource('total')} record={scopedFormData} {...rest} /&gt; : null;
        }}
      &lt;/FormDataConsumer&gt;
    &lt;/SimpleFormIterator&gt;
  &lt;/ArrayInput&gt;
  </code></pre>