You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add recommendPage to onChange when pageSize changes
- Add third parameter recommendPage to onChange callback
- calculatePage logic to preserve user's data position when changing pageSize
- Related issue: ant-design/ant-design#30610
Co-Authored-By: Claude <noreply@anthropic.com>
| 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 |
63
-
| totalBoundaryShowSizeChanger | when total larger than it, `showSizeChanger` will be true | number | 50 |
| align | align of pagination | start \| center \| end | undefined |
57
+
| defaultCurrent | uncontrolled current page | Number | 1 |
58
+
| current | current page | Number | undefined |
59
+
| total | items total count | Number | 0 |
60
+
| defaultPageSize | default items per page | Number | 10 |
61
+
| pageSize | items per page | Number | 10 |
62
+
| onChange | page change callback, the third parameter `recommendPage` is only provided when pageSize changes, useful for keeping the user's data position | Function(current, pageSize, recommendPage?) | - |
63
+
| 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 |
64
+
| totalBoundaryShowSizeChanger | when total larger than it, `showSizeChanger` will be true | number | 50 |
0 commit comments