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:
@@ -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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user