marmelab / react-admin

A frontend Framework for single-page applications on top of REST/GraphQL APIs, using TypeScript, React and Material Design
http://marmelab.com/react-admin
MIT License
24.8k stars 5.23k forks source link

sort and paginaton does not work #3720

Closed 97thjingba closed 4 years ago

97thjingba commented 5 years ago

 i want to konw why sort and pagination does not work . the data format :

{
                "id": "dcc52287-c8d4-4b4a-b918-b9a947428141",
                "status": "unprocessed",
                "user_id": "fdcbf91b-7b16-4898-82d2-15afc5b95f5a",
                "process_reply": null,
                "reported_user_id": "ae6fc833-411c-44ce-98b3-a5997f0d2f94",
                "process_at": null,
                "process_remark": null,
                "created_at": "2019-09-20T10:02:34.694000+00:00",
                "tag": [
                    "涉嫌广告"
                ],
                "content": "",
                "report_id": "dcc52287-c8d4-4b4a-b918-b9a947428141",
                "application_slug": "laiwan"
},
{
                "id": "8d7cd1c4-5bfa-4616-a0ee-abd190682ab2",
                "status": "unprocessed",
                "user_id": "aa18d035-5ac8-4133-9678-49ed2af1cc0a",
                "process_reply": null,
                "reported_user_id": "ae6fc833-411c-44ce-98b3-a5997f0d2f94",
                "process_at": null,
                "process_remark": null,
                "created_at": "2019-09-20T09:55:34.562000+00:00",
                "tag": [
                    "诈骗信息",
                    "举报签名"
                ],
                "content": "",
                "report_id": "8d7cd1c4-5bfa-4616-a0ee-abd190682ab2",
                "application_slug": "laiwan"
},

What you were expecting: Like usual sorting and paging

What happened instead: Can't Page and Sort Normally

Environment

"react-admin": "2.9.6",

djhi commented 5 years ago

Please follow the issue template

97thjingba commented 5 years ago

@djhi I have used the issue template correctly. please help me

djhi commented 5 years ago

Thanks for reporting this. If you are able to illustrate the bug or feature request with an example, please provide a sample application via one of the following means:

97thjingba commented 4 years ago

@djhi
I don't know what went wrong. I tried the simplest template, but I still can't sort and paginate normally. I think my question is in the data I returned here?

97thjingba commented 4 years ago

@djhi can you help me ? if you need other information ,i will give you

97thjingba commented 4 years ago

@djhi
WeChat3cc25afa81f7311209001283af6ba2c9

I have 25 pieces of data, but when I change the number of pages to 5, it doesn't work.

97thjingba commented 4 years ago

Is there a duplicate id in my data that can't be paged or sorted?

fzaninotto commented 4 years ago

Hi, and thanks for your question. As explained in the react-admin contributing guide, the right place to ask a "How To" question, get usage advice, or troubleshoot your own code, is StackOverFlow.

This makes your question easy to find by the core team, and the developer community. Unlike Github, StackOverFlow has great SEO, gamification, voting, and reputation. That's why we chose it, and decided to keep GitHub issues only for bugs and feature requests.

So I'm closing this issue, and inviting you to ask your question at:

http://stackoverflow.com/questions/tagged/react-admin

And once you get a response, please continue to hang out on the react-admin channel in StackOverflow. That way, you can help newcomers and share your expertise!