In react-admin I have the following ReferenceArrayInput -> SelectArrayInput component as following:
<Create {...props}>
<SimpleForm>
<ReferenceArrayInput source="clients" reference="client">
<SelectArrayInput optionText="clientName" />
</ReferenceArrayInput>
</SimpleForm>
</Create>
It works, it receives the data from the client source and id displays the options with the clientName label.
However, when the form is submitted it sends to the server the following request body:
{
"clients": [1,2,3]
{
I would like to send it as:
{
"clients": [
{"id": 1},
{"id": 2},
{"id": 3}
]
}
Is is possible, by setting some certain option or shall I use a different component?