Appearance
Pagination
Pagination is built around three parts:
- Data drivers fetch pages and return a
PaginationDataDto. - View drivers store pagination state (page, size, total) and expose page data.
- Paginators orchestrate loading and state updates.
Drivers
Pagination uses two kinds of drivers:
- Data drivers fetch pages and return a
PaginationDataDto. - View drivers store pagination state (page, size, total) and expose page data.
You can implement your own drivers by following these contracts:
PaginationDataDriverContractorStatePaginationDataDriverContractfor data driversViewDriverFactoryContractorBaseViewDriverFactoryContractfor view drivers
If you are using Vue, the library provides VuePaginationDriverFactory and VueBaseViewDriverFactory.
Built-in Data Drivers
ArrayDriver: paginate an in-memory array.RequestDriver: paginate using a request. See the Laravel pagination integration for usage details.
Paginators
Load Options
load() accepts PaginatorLoadDataOptions:
flush: clears existing data before applying the next pagereplace: replaces existing data instead of appending (useful for infinite scroll)
updateRows and removeRows are available on all paginators. See Updating Rows.
Using Laravel Pagination
If you use Laravel pagination responses, see the Laravel pagination docs for the PaginationJsonBaseRequest and RequestDriver integration.