From d535dd1ba980251a55cf41e0f16a8a8fc93e7dfb Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sat, 12 Apr 2025 21:55:51 +0200 Subject: [PATCH] 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. --- frontend/src/app/bans/bans.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/app/bans/bans.component.ts b/frontend/src/app/bans/bans.component.ts index 9f97728..9cab894 100644 --- a/frontend/src/app/bans/bans.component.ts +++ b/frontend/src/app/bans/bans.component.ts @@ -88,11 +88,13 @@ export class BansComponent implements OnInit { public search() { this.pushState() this.finalSearchTerm = this.searchTerm; + this.page = 0; } public changeHistoryType(type: 'player' | 'staff') { this.pushState(); this.userType = type; + this.page = 0; } public changeHistoryPunishment(type: 'all' | 'ban' | 'mute' | 'kick' | 'warn') {