-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to define filters as an array of Inputs #6368
Conversation
ddf8c01
to
0d7e45b
Compare
Switching to RFR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I remember having eslint issues about missing keys with the array syntax for the <Resource>
though.
Co-authored-by: Gildas Garcia <[email protected]>
@djhi I have had no eslint warning, and GitHub doesn't show any... Would you have a reproducible case? |
Nope, it was just something I remembered while working with the |
Problem
<ListActions>
is hard to override, partly because of the filter button/form combo. The<Filter>
element renders twice, which isn't a common practice, and creates a few problems.Refs #6212
Solution
Allow
<List filters>
to be an array of inputs instead of a React element.This allows to put the filters in a context, and to use
<FilterForm>
and<FilterButton>
directly:<List>
The change is backwards compatible:
<Filter>
continues to exist and still works as before.