-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hi, thanks a lot for this dataprovider. It works pretty well.
I've just stumbled over the following problem.
Reproduction
Create a ReferenceInput with an AutocompleteInput. The query that is build at the initialization (Empty search string) is the following, which results in an "Invalid filter value" backend error.
http://API/users?filter[0]=email||cont&limit=100&page=1&sort[0]=email%2CASC&offset=0
<ReferenceInput
label="Benutzer"
source="userId"
reference="users"
validate={[required()]}
sort={{ field: "email", order: "ASC" }}
perPage={100}
// This results in an error
filterToQuery={(search: string) => ({ email: search })}
// This is a workaround
filterToQuery={(search: string) => ({ email: search ? search : " " })}
>
<AutocompleteInput optionText="email" optionValue="id" />
</ReferenceInput>
Metadata
Metadata
Assignees
Labels
No labels