-
-
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 change the sort, filter and selection of ArrayField #8802
Conversation
@@ -162,8 +162,6 @@ const Root = styled('div', { | |||
})(({ theme }) => ({ | |||
display: 'flex', | |||
flexWrap: 'wrap', | |||
marginTop: theme.spacing(-1), |
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.
This looked bad in a SimpleShowLayout. It was designed to make Datagrid rows thinner, but we can do it in user land via the sx
prop (see modified PostList).
</MemoryRouter> | ||
); | ||
|
||
export const PerPage = () => ( |
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.
This one would benefit from setting up the I18nProvider
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.
You're right, fixed!
Problem
<ArrayField>
creates a very limitedListContext
that doesn't allow manipulating the listSolution
Use
useList
to prepare the List context. It already does all we need.Closes #8761
To Do
useList
in<ArrayField>
to create a complete `ListContext``sort
,filter
, andperPage
propsExample
Leveraging
perPage
and<Pagination>
in the<ArrayField>
: