referenceInput do not work with react-admin v3
macrozone opened this issue · 0 comments
macrozone commented
given a reference input:
<ReferenceInput
label="Parent page"
source="parentPage.id"
reference="Page"
>
<SelectInput optionText="path" />
</ReferenceInput>
this does not work with the upcoming v3 of react-admin because:
- it defaults to
filterToQuery={(searchText) => ({ q: searchText })}
and theq
property is not handled with this dataprovider. Solution is to pass a customfilterToQuery
, e.g.filterToQuery={(searchText) => ({ path: searchText })}
- it will call connections with
where: {ids_in: ""}}
, which throws an error in the backend