blob: d04d91c688b046486031653aa9fa115c8dcafd66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
import { LazyLoadEvent } from 'primeng/components/common/lazyloadevent'
import { SortMeta } from 'primeng/components/common/sortmeta'
import { RestPagination } from './rest-pagination'
export abstract class RestTable {
abstract totalRecords: number
abstract rowsPerPage: number
abstract sort: SortMeta
abstract pagination: RestPagination
protected abstract loadData (): void
loadLazy (event: LazyLoadEvent) {
this.sort = {
order: event.sortOrder,
field: event.sortField
}
this.pagination = {
start: event.first,
count: this.rowsPerPage
}
this.loadData()
}
}
|