AdeleD / react-paginate

A ReactJS component that creates a pagination
MIT License
2.75k stars 626 forks source link

baseline page prop #25

Open webbushka opened 9 years ago

webbushka commented 9 years ago

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.

AdeleD commented 9 years ago

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?

webbushka commented 8 years ago

Yes thats what I mean

AdeleD commented 8 years ago

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

batusai513 commented 7 years ago

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