SelectablePagination#
@palmyralabs/rt-forms-mui · grid/plugins/pagination/SelectablePagination.tsx
Overview#
MUI Pagination plus a Select for page size. Subscribes to the grid’s ${topic}/data channel to re-render, and delegates every action to the grid’s queryRef:
- Page click →
queryRef.current.gotoPage(n) - Page size change →
queryRef.current.setPageSize(n)+ re-query - Totals / current page / current limit — read from
getTotalRecords/getPageNo/getQueryLimit
Props — PageQueryPluginOptions#
Declared in this package’s grid/types.ts. Consumed fields:
| Prop | Type | Purpose |
|---|---|---|
queryRef |
RefObject<IPageQueryable> |
The grid’s query controller |
pageSize |
number | number[]? |
Dropdown options (or a single fixed size) |
ignoreSinglePage |
boolean? |
When true, hide pagination if totalPages ≤ 1 |
Example#
import { SelectablePagination } from '@palmyralabs/rt-forms-mui';
<PalmyraGrid
topic="manufacturer"
columns={manufacturerColumns}
endPoint="/mstManufacturer"
pageSize={[15, 30, 45, 100]}
plugins={{ Pagination: SelectablePagination }}
/>