-
Notifications
You must be signed in to change notification settings - Fork 0
/
pagination.component.html
70 lines (65 loc) · 1.62 KB
/
pagination.component.html
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<div class="container-fluid mt-4 mb-4">
<div class="row">
<div class="col p-0 d-flex justify-content-end">
<div class="mr-3">
<b class="mr-2">Per Page</b>
<nb-select
size="small"
[(selected)]="itemsPerPage"
(selectedChange)="onItemsPerPageChange($event)"
>
<nb-option *ngFor="let size of pageSizes" [value]="size">
{{ size }}
</nb-option>
</nb-select>
</div>
<div>
<button
nbButton
size="small"
(click)="firstPage()"
[disabled]="currentPage === 1"
class="mr-2"
>
First
</button>
<button
nbButton
size="small"
(click)="prevPage()"
[disabled]="currentPage === 1"
class="mr-2"
>
<nb-icon icon="chevron-left-outline"></nb-icon>
</button>
<button
nbButton
size="small"
*ngFor="let page of pages"
(click)="goToPage(page)"
[status]="currentPage === page ? 'primary' : 'basic'"
>
{{ page }}
</button>
<button
nbButton
size="small"
(click)="nextPage()"
[disabled]="currentPage === totalPages"
class="ml-2"
>
<nb-icon icon="chevron-right-outline"></nb-icon>
</button>
<button
nbButton
size="small"
(click)="lastPage()"
[disabled]="currentPage === totalPages"
class="ml-2"
>
Last
</button>
</div>
</div>
</div>
</div>