Priyanka
Priyanka

Reputation: 45

Using React Paginate

I am using React Paginate and just want the previous < and next level > on my page.but its showing the number from 1 to 10 too.Is there any way to get only level not the pagination numbers?.

Upvotes: 0

Views: 2419

Answers (2)

Hien
Hien

Reputation: 2120

I found the best component handling it, react-pagination-custom.

<TinyPagination
    total = {...}
    selectedPageId = {...}
    itemPerPage = {...}
    renderBtnNumber = {...}
    maxBtnNumbers = {...}
    preKey = '...'
    nextKey = '...'
    {...someOptionalProperties}
/>

It allow you custom everything (number buttons, wrap container, spread,..). Its document is well, demo is also clear.

Upvotes: 0

Moris
Moris

Reputation: 3083

See if the following works:

<ReactPaginate previousLabel={"previous"} nextLabel={"next"} pageCount={0} ...anyOtherProps />

Otherwise you can just do some easy filtering. Some options are to target the page counts with CSS and adding the display:none attribute to it or simply removing it from the DOM with JS.

Upvotes: 1

Related Questions