Skip to content

Commit e52999f

Browse files
committed
update README.md
1 parent 1525fd6 commit e52999f

File tree

1 file changed

+36
-29
lines changed

1 file changed

+36
-29
lines changed

README.md

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,37 +48,44 @@ Local example: `npm run start` then `http://localhost:9001`
4848
import Pagination from 'rc-pagination';
4949

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

8185
## License
8286

8387
rc-pagination is released under the MIT license.
88+
89+
```
90+
8491
```

0 commit comments

Comments
 (0)