Search.../

pagination

Sets or gets the table's pagination options.

Description

Setting the pagination property sets the table's pagination options and changes the way the table is paginated.

Getting the pagination property returns the table's current pagination options.

Type:

PaginationOptionsRead & Write
NAME
TYPE
DESCRIPTION
type
string

The type of pagination. One of:

  • "normal": No pagination. The table is scrollable if there are more rows than can be displayed at once. All data is fetched at once.
  • "pagination": The data is separated into pages which are navigatable using paging buttons. New data is fetched when a user clicks on a paging button.
  • "virtual": The data is separated into pages which are navigated by scrolling. New data is fetched when user a user scrolls below the displayed rows.
rowsPerPage
number

The number of rows per page.

Was this helpful?

Get the table's pagination options

Copy Code
1let tablePagination = $w("#myTable").pagination;
2
3let paginationType = tablePagination.type; // "pagination"
4let paginationRows = tablePagination.rowsPerPage; // 5
Set the table's pagination options

Copy Code
1$w("#myTable").pagination = {"type": "pagination", "rowsPerPage": 4};