Form in filters
See original GitHub issueWhat you were expecting:
Add a search filter in <List />
What happened instead:
I get an error about the input field: Error: useField must be used inside of a <Form> component

Steps to reproduce:
- Get a Users from List, using custom dataprovider, based on simpleRest (here I removed the query string, to get the values from the API)
- Using the tutorial, I added filters like the example, with
filtersproperty - Basically, I copy the filters from the tutorial, and if the field use
alwaysOn, I get an error when I try to render the view, and if I didn’t usealwaysOn, and add the new filter, I get the previous error aboutuseField. - If I add a “form” I didn’t get the error, but that is not specified in the tutorial
Related code:
const UserFilter: React.FC = (props) => (
<Filter {...props}>
{/* <SimpleForm> */}
<SearchInput source="firstName" />
<QuickFilter
source="watchTutorialVideo"
label="Tutorial"
defaultValue={true}
/>
<QuickFilter
source="inviteThreeFriends"
label="(3)friends"
defaultValue={true}
/>
<QuickFilter
source="completeOnboardingProcess"
label="Onboarding"
defaultValue={true}
/>
{/* </SimpleForm> */}
</Filter>
)
…
<List
{...props}
title="User List"
filters={<UserFilter />}
bulkActionButtons={<UsersBulkActionButtons />}
>
More Details:
select FirstName:


Environment
- React-admin version: “^3.13.2”
- React version: “^17.0.1”
- Browser: Chrome / Safari
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Form.Filter property (Access) - Microsoft Learn
The Filter property is a string expression consisting of a WHERE clause without the WHERE keyword. For example, the following Visual Basic code ......
Read more >Filter by Form - CustomGuide
1. Click the Advanced Filter Options button. 2. Select Filter by Form. In the Filter by Form window, you can specify your filter...
Read more >Filter Form - Dribbble
Filter Form. Inspirational designs, illustrations, and graphic elements from the world's best designers. Want more inspiration? Browse our search results.
Read more >Creating a Filter Form - Ycode
Filters are available for search and multi-filter functionality at the user's end. With these types of forms, website visitors are able to sort...
Read more >Microsoft Access tips: Filter a Form on a Field in a Subform
The Filter property of forms (introduced in Access 95) makes it easy to filter a form based on a control in the form....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

You’re using a SelectField instead of a SelectInput…
Anyway, I realize you need support more than you declare a bug in the library. The right channel for that is StackOverflow, as we keep the GitHub issues only for problems with the library itself, not its usage.
So I’m closing the issue.
I can’t reproduce the error on the Simple example. Could you please fork the Simple example CodeSandbox (https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple) and tweak the Posts list until you can reproduce the error, then paste the link of you fork here?