Add search state persistence and pagination for bans history

Enhanced the bans component to retain search state using the History API. Updated the history component to support paginated and filtered data loading based on user input and search terms.
This commit is contained in:
2025-04-12 01:35:40 +02:00
parent 0a2338e42e
commit 66d641b825
3 changed files with 56 additions and 13 deletions
+3 -2
View File
@@ -23,7 +23,7 @@
[(ngModel)]="searchTerm"
(input)="filterNames()"
>
<button class="searchButton">Search</button>
<button class="searchButton" (click)="search()">Search</button>
<div class="search-dropdown" *ngIf="filteredNames.length > 0 && searchTerm">
<div
class="dropdown-item"
@@ -35,7 +35,8 @@
</div>
</div>
<div class="historyTable">
<app-history [userType]="userType" [punishmentType]="punishmentType"></app-history>
<app-history [userType]="userType" [punishmentType]="punishmentType"
[page]="page" [searchTerm]="finalSearchTerm"></app-history>
</div>
</div>
</section>