Weakky/ra-data-opencrud

referenceInput do not work with react-admin v3

macrozone opened this issue · 0 comments

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 the q property is not handled with this dataprovider. Solution is to pass a custom filterToQuery, e.g. filterToQuery={(searchText) => ({ path: searchText })}
  • it will call connections with where: {ids_in: ""}}, which throws an error in the backend