pagination does not work with live data (react-admin) - reactjs

Hello everyone,
I am using react-admin for admin panel. I am facing issue, the pagination does not work properly.
The pagination makes only for 10 records.
eg. if I have 100 records, there should be 10 pagination if every page has 10 records.
but it makes pagination for 10 records and shows all the records on the 1st-page. the plugin does not make pagination. Whether records are 100 or more than 100.
if i configure dataprovider with fake data, then it is working perfectly.
if anyone has idea about that please let me know solution.
Thanks

react-admin relies on Content-Range response header in order to build the pagination controls. Does your API return correct value like Content-Range: posts 0-9/100? Sorry I don't have enough reputation to post this as a comment.

Related

Paginating a table in ReactJS

I already have a table that renders my data. But there can be as many as 1000 rows in the table.
Right now, the dataprovider component sends date to the table component via props. What's the best way to start pagination? Should I still fetch all the data at once, as is currently the case? If so, where do I store it? Keep it in memory and take slices as needed? Or somehow use query params for the the number of records to fetch (0 - 24, 25 - 49, etc)?
Returning all the data in one response could be too large, this depends on the size of each item. If the size of the response is small, you can simply request all the data and do the pagination on the UI. You can use react-table to do this.
If the response is too heavy (time-consuming), you have to implement pagination on your server. Then you can use react-table to seamlessly integrate the pagination to the UI.
The approach you use to paginate it is up to you, here are a few ways you can do it in: API pagination guide

angular material md.data.table pagination issue

I'm using the md.data.table to display data that I get from the backend,
there is a lot of data (~40000 row) so I'm using backend pagination like this:
in the fist time I get 100 row from the backend so with a limit of 10, the user can navigate in the first 10 pages, when he ask for a page in [11,20](for example) a new request is sent to get the newt 100 rows, and so on.
my problem is that when I get a new 100 rows from the backend (for example the user select the 11th page) I get the result but the page number return to 1 I tried to set it manually using : paginationParams.page=11 but it doesn't work
can anyone help.
thank you in advance :)
I find the solution my self, and here is the solution for those who will have the same issue
the problem was that when I send the request the get the next 100 rows, I copy it in the variable used to show the first 100 rows.
so the solution is, instead of copy the result in the variable, I add them to it, and that solve the problem

Issues on a select with AngularJS and Google Spreadsheet

I want to create a small web app which would display a list of movies, with a Google spreadsheet set as a database. So far, I was able to connect my spreadsheet to my app and I also added some filters to it. (As a side note, this thread really helped me in the process.)
Here is a very simplified version of my app: http://plnkr.co/edit/BtbSCVOh7KJsMHjANxMP?p=preview
I still have 3 problems with my <select>, which I can't fix despite trying for hours:
I can't sort my <options> alphabetically. Trying with orderBy didn't return anything.
I can't figure out a way to split my categories when there are more than one for a movie.
If the "categorie" field in my spreadsheet is empty, it will return a blank <option> which I would like to remove or hide.
My guess is that I'll need to update my function one way or another, but I'm a bit lost at the moment.
Any help on this would be really appreciated!

pagination in view page with cakephp2

I am developing a simple web-mail client using cakephp2.
For the mailbox list display I am successfully implemented pagination with Paginator helper
Now when I click a particular item in the mailbox list page will show
the message details. In the message display page I also want to show navigation
e.g 3 of 23 << | >>
Is it possible to do this with Paginatir helper?
Awaiting your valuable suggestion.
Regards.
Paginator documentation does not provide information which I have asked for,
But fortunately after a vast reading of Retrieving Your Data section of Model in
cakephp2.0 documentation I have got my ANSWER.
I have almost done with find(neighbors)
Get Your Neigbor
Now I have to set the record number for the current record...then it will be completed.
Thanks for responding..

Backbone pagination with static data set

I am using Backbone to do pagination on a static dataset. So I have a dataset with 100 records, I would like to store that data in the collection and use pagination over that dataset.
There is no database pagination available. So if I have 100 records, I would like to show 10 and then when I scroll, I would like to append another 10 to the view.
Any help is appreciated.
This might help you. Look at clientPager. A plugin by Addy Osmani.

Resources