Pagination

The pagination feature provides methods and state for dividing table data into pages. These properties are available on the table instance when using the pagination feature. See the pagination guide for usage examples and configuration details.

PropType
Returns whether the table can go to the next page.
      () => boolean
      Returns whether the table can go to the previous page.
          () => boolean
          Returns the page count. If manually paginating or controlling the pagination state, this will come directly from the options.pageCount table option, otherwise it will be calculated from the table data using the total row count and current page size.
              () => number
              Returns an array of page options (zero-index-based) for the current page size.
                  () => number[]
                  Returns the row model for the table after pagination has been applied.
                      () => {
                      flatRows: Row[]
                      rows: Row[]
                      rowsById: Record
                      }
                      Returns the row model for the table before any pagination has been applied.
                          () => {
                          flatRows: Row[]
                          rows: Row[]
                          rowsById: Record
                          }
                          Increments the page index by one, if possible.
                              () => void
                              Decrements the page index by one, if possible.
                                  () => void
                                  Resets the page index to its initial state. If defaultState is true, the page index will be reset to 0 regardless of initial state.
                                      (
                                      defaultState?: boolean,
                                      ) => void
                                      Resets the page size to its initial state. If defaultState is true, the page size will be reset to 10 regardless of initial state.
                                          (
                                          defaultState?: boolean,
                                          ) => void
                                          Resets the pagination state to initialState.pagination, or true can be passed to force a default blank state reset to [].
                                              (
                                              defaultState?: boolean,
                                              ) => void
                                              Updates the page count using the provided function or value.
                                                  (
                                                  updater:
                                                  | T
                                                  | ((old: T) => T),
                                                  ) => void
                                                  Updates the page index using the provided function or value in the state.pagination.pageIndex state.
                                                      (
                                                      updater:
                                                      | T
                                                      | ((old: T) => T),
                                                      ) => void
                                                      Updates the page size using the provided function or value in the state.pagination.pageSize state.
                                                          (
                                                          updater:
                                                          | T
                                                          | ((old: T) => T),
                                                          ) => void
                                                          Sets or updates the state.pagination state.
                                                              (
                                                              updater:
                                                              | T
                                                              | ((old: T) => T),
                                                              ) => void
                                                              Type
                                                              () => boolean
                                                              Description
                                                              Returns whether the table can go to the next page.
                                                                  Type
                                                                  () => boolean
                                                                  Description
                                                                  Returns whether the table can go to the previous page.
                                                                      Type
                                                                      () => number
                                                                      Description
                                                                      Returns the page count. If manually paginating or controlling the pagination state, this will come directly from the options.pageCount table option, otherwise it will be calculated from the table data using the total row count and current page size.
                                                                          Type
                                                                          () => number[]
                                                                          Description
                                                                          Returns an array of page options (zero-index-based) for the current page size.
                                                                              Type
                                                                              () => {
                                                                              flatRows: Row[]
                                                                              rows: Row[]
                                                                              rowsById: Record
                                                                              }
                                                                              Description
                                                                              Returns the row model for the table after pagination has been applied.
                                                                                  Type
                                                                                  () => {
                                                                                  flatRows: Row[]
                                                                                  rows: Row[]
                                                                                  rowsById: Record
                                                                                  }
                                                                                  Description
                                                                                  Returns the row model for the table before any pagination has been applied.
                                                                                      Type
                                                                                      () => void
                                                                                      Description
                                                                                      Increments the page index by one, if possible.
                                                                                          Type
                                                                                          () => void
                                                                                          Description
                                                                                          Decrements the page index by one, if possible.
                                                                                              Type
                                                                                              (
                                                                                              defaultState?: boolean,
                                                                                              ) => void
                                                                                              Description
                                                                                              Resets the page index to its initial state. If defaultState is true, the page index will be reset to 0 regardless of initial state.
                                                                                                  Type
                                                                                                  (
                                                                                                  defaultState?: boolean,
                                                                                                  ) => void
                                                                                                  Description
                                                                                                  Resets the page size to its initial state. If defaultState is true, the page size will be reset to 10 regardless of initial state.
                                                                                                      Type
                                                                                                      (
                                                                                                      defaultState?: boolean,
                                                                                                      ) => void
                                                                                                      Description
                                                                                                      Resets the pagination state to initialState.pagination, or true can be passed to force a default blank state reset to [].
                                                                                                          Type
                                                                                                          (
                                                                                                          updater:
                                                                                                          | T
                                                                                                          | ((old: T) => T),
                                                                                                          ) => void
                                                                                                          Description
                                                                                                          Updates the page count using the provided function or value.
                                                                                                              Type
                                                                                                              (
                                                                                                              updater:
                                                                                                              | T
                                                                                                              | ((old: T) => T),
                                                                                                              ) => void
                                                                                                              Description
                                                                                                              Updates the page index using the provided function or value in the state.pagination.pageIndex state.
                                                                                                                  Type
                                                                                                                  (
                                                                                                                  updater:
                                                                                                                  | T
                                                                                                                  | ((old: T) => T),
                                                                                                                  ) => void
                                                                                                                  Description
                                                                                                                  Updates the page size using the provided function or value in the state.pagination.pageSize state.
                                                                                                                      Type
                                                                                                                      (
                                                                                                                      updater:
                                                                                                                      | T
                                                                                                                      | ((old: T) => T),
                                                                                                                      ) => void
                                                                                                                      Description
                                                                                                                      Sets or updates the state.pagination state.