Skip to content

Commit 5dcb8ea

Browse files
committed
fix: pagination component
1 parent 31c9c00 commit 5dcb8ea

3 files changed

Lines changed: 56 additions & 12 deletions

File tree

package-lock.json

Lines changed: 48 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"@tailwindcss/postcss": "^4.1.16",
4646
"@types/jasmine": "~5.1.12",
4747
"angular-eslint": "20.5.0",
48-
"cypress": "^15.5.0",
48+
"cypress": "^15.6.0",
4949
"daisyui": "^5.3.10",
5050
"eslint": "^9.38.0",
5151
"eslint-config-prettier": "^10.1.8",

projects/dashboard-core/src/lib/common/pagination/pagination.component.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-->
1313

1414
<div class="join text-base-content">
15-
<button class="btn btn-lg btn-ghost join-item border-none" (click)="backward()" [disabled]="currentPage == 0">
15+
<button class="btn btn-lg btn-ghost join-item border-none" (click)="backward()" [disabled]="currentPage === 0">
1616
«
1717
</button>
1818
<div class="dropdown dropdown-center dropdown-hover join-item">
@@ -21,13 +21,17 @@
2121
</button>
2222
<ul class="menu dropdown-content bg-base-100 rounded-box shadow-2xl">
2323
@for (_ of [].constructor(totalPages + 1); track _; let i = $index) {
24-
<li (click)="jump(i)">
24+
<li [tabindex]="i" (keydown)="jump(i)" (click)="jump(i)">
2525
<a class="text-nowrap">Page {{ i + 1 }}</a>
2626
</li>
2727
}
2828
</ul>
2929
</div>
30-
<button class="btn btn-lg btn-ghost join-item border-none" (click)="forward()" [disabled]="currentPage == totalPages">
30+
<button
31+
class="btn btn-lg btn-ghost join-item border-none"
32+
(click)="forward()"
33+
[disabled]="currentPage === totalPages"
34+
>
3135
»
3236
</button>
3337
</div>

0 commit comments

Comments
 (0)