Skip to content

Commit

Permalink
feat: do not display prev/next btns on extreme pages
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoinier committed Jul 11, 2024
1 parent 31a6704 commit 885b687
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="relative">
<div class="flex flex-row items-center">
@if (currentPage !== 1) {
<gn-ui-button
type="outline"
[disabled]="currentPage === 1"
(buttonClick)="previousPage()"
extraClass="pagination-btn-nav mr-14"
>
Expand All @@ -13,7 +13,7 @@
>mel.datahub.search.pagination.previous</span
>
</gn-ui-button>
@for(page of visiblePages; track $index){ @if(page === '...'){
} @for(page of visiblePages; track $index){ @if(page === '...'){
<span class="mr-14">{{ page }}</span>
} @else {
<gn-ui-button
Expand All @@ -23,10 +23,9 @@
extraClass="pagination-btn"
>{{ page }}</gn-ui-button
>
} }
} } @if (currentPage !== totalPages) {
<gn-ui-button
type="outline"
[disabled]="currentPage === totalPages"
(buttonClick)="nextPage()"
extraClass="pagination-btn-nav"
>
Expand All @@ -37,5 +36,6 @@
>chevron_right</mat-icon
>
</gn-ui-button>
}
</div>
</div>

0 comments on commit 885b687

Please sign in to comment.