@@ -52,35 +52,36 @@ ReactDOM.render(<Pagination />, container);
5252
5353## API
5454
55- | Parameter | Description | Type | Default |
56- | ---------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
57- | disabled | disable pagination | Bool | - |
58- | align | align of pagination | start \| center \| end | undefined |
59- | defaultCurrent | uncontrolled current page | Number | 1 |
60- | current | current page | Number | undefined |
61- | total | items total count | Number | 0 |
62- | defaultPageSize | default items per page | Number | 10 |
63- | pageSize | items per page | Number | 10 |
64- | onChange | page change callback | Function(current, pageSize) | - |
65- | showSizeChanger | show pageSize changer | Bool | ` false ` when total less then ` totalBoundaryShowSizeChanger ` , ` true ` when otherwise |
66- | totalBoundaryShowSizeChanger | when total larger than it, ` showSizeChanger ` will be true | number | 50 |
67- | pageSizeOptions | specify the sizeChanger selections | Array<String > | [ '10', '20', '50', '100'] |
68- | onShowSizeChange | pageSize change callback | Function(current, size) | - |
69- | hideOnSinglePage | hide on single page | Bool | false |
70- | showPrevNextJumpers | show jump-prev, jump-next | Bool | true |
71- | showQuickJumper | show quick goto jumper | Bool / Object | false / {goButton: true} |
72- | showTotal | show total records and range | Function(total, [ from, to] ) | - |
73- | className | className of pagination | String | - |
74- | simple | when set, show simple pager | Bool / { readOnly?: boolean; } | - |
75- | locale | to set l10n config | Object | [ zh_CN] ( https://github.com/react-component/pagination/blob/master/src/locale/zh_CN.js ) |
76- | style | the style of pagination | Object | {} |
77- | showLessItems | show less page items | Bool | false |
78- | showTitle | show page items title | Bool | true |
79- | itemRender | custom page item renderer | Function(current, type: 'page' \| 'prev' \| 'next' \| 'jump-prev' \| 'jump-next', element): React.ReactNode \| ` (current, type, element) => element ` | |
80- | prevIcon | specify the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
81- | nextIcon | specify the default next icon | ReactNode \| (props: PaginationProps) => ReactNode | |
82- | jumpPrevIcon | specify the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
83- | jumpNextIcon | specify the default next icon | ReactNode \| (props: PaginationProps) => ReactNode | |
55+ // prettier-ignore
56+ | Parameter | Description | Type | Default |
57+ | --- | --- | --- | --- |
58+ | disabled | disable pagination | Bool | - |
59+ | align | align of pagination | start \| center \| end | undefined |
60+ | defaultCurrent | uncontrolled current page | Number | 1 |
61+ | current | current page | Number | undefined |
62+ | total | items total count | Number | 0 |
63+ | defaultPageSize | default items per page | Number | 10 |
64+ | pageSize | items per page | Number | 10 |
65+ | onChange | page change callback | Function(current, pageSize) | - |
66+ | showSizeChanger | show pageSize changer | boolean \| [ SelectProps] ( https://github.com/react-component/select/blob/561f8b7d69fd5dd2cd7d917c88976cca4e539a9d/src/Select.tsx#L112 ) | ` false ` when total less than ` totalBoundaryShowSizeChanger ` , ` true ` when otherwise |
67+ | totalBoundaryShowSizeChanger | when total larger than it, ` showSizeChanger ` will be true | number | 50 |
68+ | pageSizeOptions | specify the sizeChanger selections | Array<String > | [ '10', '20', '50', '100'] |
69+ | onShowSizeChange | pageSize change callback | Function(current, size) | - |
70+ | hideOnSinglePage | hide on single page | Bool | false |
71+ | showPrevNextJumpers | show jump-prev, jump-next | Bool | true |
72+ | showQuickJumper | show quick goto jumper | Bool / Object | false / {goButton: true} |
73+ | showTotal | show total records and range | Function(total, [ from, to] ) | - |
74+ | className | className of pagination | String | - |
75+ | simple | when set, show simple pager | Bool / { readOnly?: boolean; } | - |
76+ | locale | to set l10n config | Object | [ zh_CN] ( https://github.com/react-component/pagination/blob/master/src/locale/zh_CN.js ) |
77+ | style | the style of pagination | Object | {} |
78+ | showLessItems | show less page items | Bool | false |
79+ | showTitle | show page items title | Bool | true |
80+ | itemRender | custom page item renderer | Function(current, type: 'page' \| 'prev' \| 'next' \| 'jump-prev' \| 'jump-next', element): React.ReactNode \| ` (current, type, element) => element ` | |
81+ | prevIcon | specify the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
82+ | nextIcon | specify the default next icon | ReactNode \| (props: PaginationProps) => ReactNode | |
83+ | jumpPrevIcon | specify the default previous icon | ReactNode \| (props: PaginationProps) => ReactNode | |
84+ | jumpNextIcon | specify the default next icon | ReactNode \| (props: PaginationProps) => ReactNode | |
8485
8586## License
8687
0 commit comments