fix(pagination): window totalItems for performance (#2160)

Fixes #2156
This commit is contained in:
Eric Liu 2025-04-26 13:25:52 -07:00 committed by GitHub
commit ed3928bb01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 102 additions and 20 deletions

View file

@ -16,6 +16,17 @@ type $Props = {
*/
totalItems?: number;
/**
* If `totalItems` is a large number, it can affect the
* rendering performance of this component since its value
* is used to calculate the number of pages in the native
* select dropdown. This value creates a small window of
* pages rendered around the current page. By default,
* a maximum of 1000 select items are rendered.
* @default 1000
*/
pageWindow?: number;
/**
* Set to `true` to disable the pagination
* @default false