Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

referenceInput do not work with react-admin v3 #40

Open
macrozone opened this issue Sep 2, 2019 · 0 comments
Open

referenceInput do not work with react-admin v3 #40

macrozone opened this issue Sep 2, 2019 · 0 comments

Comments

@macrozone
Copy link

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant