Closed joshhopkins closed 4 years ago
That field type is just an example. Try using the actual field name in the filter definition.
@joshhopkins Perhaps it was an issue on a previous commit but autocompleteInput seems to be working perfectly fine currently. If you update to the latest release of the lib (0.1.7) and are still having the issue, please post a snippet of the code causing the error.
@Steams thanks, just tested with 0.1.7. I should clarify that I'm populating the choices
attributed with a list of related records using <ReferenceInput>
.
This throws: undefined is not an object (evaluating 'i.type')
:
<ReferenceInput source="post_id" reference="posts" validate={required()}>
<AutocompleteInput optionText="title" optionValue="post_id" />
</ReferenceInput>
Solved. Not a bug, but a less obvious "feature" of react-admin. https://github.com/marmelab/react-admin/issues/2615
I'll leave this here, as a follow-up to the issue.
Thanks @zenomeki
Heads up that Hasura has taken over maintenance of this library: https://github.com/hasura/ra-data-hasura
AutocompleteInput broken:
GraphQL error: field "q" not found in type: GraphQL_TYPE__bool_exp