Add pagination handling with pageSize and pageChange EventEmitter

Introduced `pageSize` in `bans.component.ts` to manage pagination logic and updated `buttonActive` to account for page size constraints. Added `pageChange` EventEmitter in `history.component.ts` to notify the parent component of page changes. Updated the template to bind `pageChange` for dynamic page size updates.
This commit is contained in:
2025-04-12 22:11:40 +02:00
parent d535dd1ba9
commit a5adb031bd
3 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -48,7 +48,8 @@
</div>
<div class="historyTable">
<app-history [userType]="userType" [punishmentType]="punishmentType"
[page]="page" [searchTerm]="finalSearchTerm"></app-history>
[page]="page" [searchTerm]="finalSearchTerm" (pageChange)="pageSize = $event">
</app-history>
</div>
<div class="changePageButtons">
<button [ngClass]="{'active': buttonActive(0)}" [disabled]="!buttonActive(0)"