1.0.0 • Published 3 years ago

hds-rc-pagination v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

hds-rc-pagination


React Pagination Component.

Development

npm install
npm start

Example

http://localhost:9001

Usage

import Pagination from 'hds-rc-pagination';

ReactDOM.render(<Pagination />, container);

API

ParameterDescriptionTypeDefault
disableddisable paginationBool-
defaultCurrentuncontrolled current pageNumber1
currentcurrent pageNumberundefined
totalitems total countNumber0
defaultPageSizedefault items per pageNumber10
pageSizeitems per pageNumber10
onChangepage change callbackFunction(current, pageSize)-
showSizeChangershow pageSize changerBoolfalse when total less then totalBoundaryShowSizeChanger, true when otherwise
totalBoundaryShowSizeChangerwhen total larger than it, showSizeChanger will be truenumber50
pageSizeOptionsspecify the sizeChanger selectionsArray'10', '20', '50', '100'
onShowSizeChangepageSize change callbackFunction(current, size)-
hideOnSinglePagehide on single pageBoolfalse
showPrevNextJumpersshow jump-prev, jump-nextBooltrue
showQuickJumpershow quick goto jumperBool / Objectfalse / {goButton: true}
showTotalshow total records and rangeFunction(total, from, to)-
classNameclassName of paginationString-
simplewhen set, show simple pagerObjectnull
localeto set l10n configObjectzh_CN
stylethe style of paginationObject{}
showLessItemsshow less page itemsBoolfalse
showTitleshow page items titleBooltrue
itemRendercustom page item rendererFunction(current, type: 'page''prev''next''jump-prev''jump-next', element): React.ReactNode(current, type, element) => element
prevIconspecifict the default previous iconReactNode | (props: PaginationProps) => ReactNode
nextIconspecifict the default previous iconReactNode | (props: PaginationProps) => ReactNode
jumpPrevIconspecifict the default previous iconReactNode | (props: PaginationProps) => ReactNode
jumpNextIconspecifict the default previous iconReactNode | (props: PaginationProps) => ReactNode