admin page updates
This commit is contained in:
@@ -25,6 +25,19 @@ function paginateData(
|
||||
this.submit();
|
||||
},
|
||||
|
||||
sortByColumn(field) {
|
||||
if (this.orderBy === field) {
|
||||
// Toggle order if same column
|
||||
this.order = this.order === "ASC" ? "DESC" : "ASC";
|
||||
} else {
|
||||
// New column, default to DESC
|
||||
this.orderBy = field;
|
||||
this.order = "DESC";
|
||||
}
|
||||
this.page = 1; // Reset to first page when sorting
|
||||
this.submit();
|
||||
},
|
||||
|
||||
setPerPage(n) {
|
||||
this.perPage = n;
|
||||
this.page = 1; // Reset to first page when changing per page
|
||||
|
||||
Reference in New Issue
Block a user