Skip to main content

Paginate

The paging function can also be used independently if tables are not needed.

import {Paginate} from '@acrool/react-table';


<Paginate
meta={meta}
info={info}
onChangePage={onChangePage}
pageLimitOptions={pageLimitOptions}

nextText={<ArrowRightIcon/>}
prevText={<ArrowRightIcon style={{transform: 'rotate(180deg)'}}/>}
/>
Show 11 - 20 itemTotal 100 item / 6 Page

Props​

Props NameTypeRequiredDefaultDescription
styleCSS.Properties
classNamestring
metaRequired<IPage>✓Currently specified page parameters
infoIPaginateInfo{totalItems: 0,totalPages: 1}Page count information
onChangePage(paginateMeta: Required<IPage>) => void✓Method when changing page
pageLimitOptionsnumber[][8, 40, 72, 150]Select the menu to display the number of items per page
nextTextReactNodeNext page button text
prevTextReactNodePrevious page button text

IPage​

Props NameTypeRequiredDescription
currentPagenumber✓What page is currently
pageLimitnumberDisplay several pieces of information on one page

IPaginateInfo​

Props NameTypeRequiredDescription
totalItemsnumber✓Total number of data
totalPagesnumber✓Total pages