What you were expecting:
I expected that I would be able to select several regions, depending on the selected region (the region id falls into the region filter). And so several times in ArrayInput. It's impossible. See gif.
...
<ArrayInput source="locations" >
<SimpleFormIterator>
<ReferenceInput label="resources.User.fields.regionId" source="regionId" reference="Location" filter={{ type: 'REGION' }} options={{ fullWidth: true }} allowEmpty>
<AutocompleteInput suggestionComponent={AddressSuggestionComponent} optionText={choice => `${choice.name} ${choice.typeShort}`}/>
</ReferenceInput>
<FormDataConsumer>{
({ formData, scopedFormData, ...rest }) =>
<ReferenceArrayInput label="resources.User.fields.districtIdOrCityIds" source="districtIdOrCityIds" reference="Location" filter={{ type: 'DISTRICT', parentIds: (!!scopedFormData && !!scopedFormData.regionId) ? scopedFormData.regionId : null}} options={{ fullWidth: true }} {...rest} >
<AutocompleteArrayInput optionText={optionRenderer} suggestionComponent={AddressSuggestionComponent} {...rest}/>
</ReferenceArrayInput>
}
</FormDataConsumer>
</SimpleFormIterator>
</ArrayInput>
...
What happened instead:

Other information:
Everything inside FormDataConsumer does not fall into the scopedFormData and formData array.
Environment
Can you please write in english ?
sorry
We've never tested using a FormDataConsumer inside a SimpleFormIterator, and we don't want to support that use case (becasue it's compex and uncommon). I suggest you write your own component instead of using ArrayInput.
I know this issue has been closed since a while, but in the docs:
https://marmelab.com/react-admin/Inputs.html#linking-two-inputs
There's an example of this use case. Check this section:
And here is an example usage for getSource inside
:
Most helpful comment
I know this issue has been closed since a while, but in the docs:
https://marmelab.com/react-admin/Inputs.html#linking-two-inputs
There's an example of this use case. Check this section: