DataGrid sorting not work
Hi! I would like to implement the sorting in my DataGrid and I did that :
It not work and i don't no what going wrong in my code (I followed this doc : https://refine.dev/docs/api-reference/mui/hooks/useDataGrid/#sorting)
useDataGrid | refine
By using useDataGrid, you are able to get properties that are compatible with MUI X
component. All features such as sorting, filtering and pagination comes as out of box. For all the other features, you can refer to the MUI X
documentation.5 Replies
other-emerald•2y ago
Hi @harisris,
What is your request payload on network tab ?
DataGrid code seems not have any issues.
maybe you can check your data provider.
this tutorial explains sorting and filtering
https://refine.dev/docs/tutorial/understanding-dataprovider/create-dataprovider/#getlist
solid-orange•2y ago
the payload is empty
other-emerald•2y ago
probably your data provider have missing implementations. you can follow the data provider tutorial I sent above 🙏
solid-orange•2y ago
i'll try
I'm facing a problem. The pagiation return by the API work is an integer which give the number of the page (pages size are fix). So how and where can I implement the sorting with this API ?
(here is my
getList
:
other-emerald•2y ago
i added _sort field to your code from tutorial