Reset page number on search and filter changes

Ensure the page is reset to 0 when performing a search or changing filters. This prevents issues with incorrect page states and improves navigation consistency.
This commit is contained in:
Teriuihi 2025-04-12 21:55:51 +02:00
parent 13122559db
commit d535dd1ba9

View File

@ -88,11 +88,13 @@ export class BansComponent implements OnInit {
public search() { public search() {
this.pushState() this.pushState()
this.finalSearchTerm = this.searchTerm; this.finalSearchTerm = this.searchTerm;
this.page = 0;
} }
public changeHistoryType(type: 'player' | 'staff') { public changeHistoryType(type: 'player' | 'staff') {
this.pushState(); this.pushState();
this.userType = type; this.userType = type;
this.page = 0;
} }
public changeHistoryPunishment(type: 'all' | 'ban' | 'mute' | 'kick' | 'warn') { public changeHistoryPunishment(type: 'all' | 'ban' | 'mute' | 'kick' | 'warn') {