react-paginate icon indicating copy to clipboard operation
react-paginate copied to clipboard

baseline page prop

Open webbushka opened this issue 10 years ago • 4 comments
trafficstars

It would be nice to have a property that could be passed in to define the baseline for the pages. Right now the baseline is hard coded as 0, but it would be nice to change it to baseline at 1.

What are your thoughts? Any particular reason not to do this? It would help me out in my current project as my routes follow the pagination and I hate to see a route with a 0 in it.

I'd be happy to contribute a pull request to make this happen.

webbushka avatar Sep 22 '15 19:09 webbushka

Sorry I'm not sure I understand what you mean by "baseline". Are you talking about the index of pages that starts at 0? And comparisons made on this index here: https://github.com/AdeleD/react-paginate/blob/master/react_components/PaginationBoxView.js#L67 and here: https://github.com/AdeleD/react-paginate/blob/master/react_components/PaginationBoxView.js#L83 for instance?

AdeleD avatar Sep 22 '15 20:09 AdeleD

Yes thats what I mean

webbushka avatar Sep 24 '15 17:09 webbushka

Ok. I don't see any problem to make this index customizable.

AdeleD avatar Sep 27 '15 18:09 AdeleD

Is there a way right now to pass the base index?, the paging of the api i work with starts in 1, that would be a great feature

batusai513 avatar Mar 14 '17 01:03 batusai513