Skip to content

referenceInput do not work with react-admin v3 #40

@macrozone

Description

@macrozone

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions