Reset to page 1 when changing sort order
authorMarcel Werk <burntime@woltlab.com>
Wed, 11 Sep 2024 13:27:28 +0000 (15:27 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 12 Nov 2024 11:51:53 +0000 (12:51 +0100)
ts/WoltLabSuite/Core/Component/GridView.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/GridView.js

index ffe7e65b9f362bce331a0fd05b1a520427744484..c0b1ca299af812305a8b37223da2a89669b5bc6c 100644 (file)
@@ -65,7 +65,7 @@ export class GridView {
       this.#sortOrder = "ASC";
     }
 
-    this.#loadRows();
+    this.#switchPage(1);
     this.#renderActiveSorting();
   }
 
index 3178cad306efc7112b173b8c313deb094f566697..8e7876ed2908a021931ebe4aaab701e26344d30e 100644 (file)
@@ -53,7 +53,7 @@ define(["require", "exports", "tslib", "../Api/GridViews/GetRows", "../Dom/Util"
                 this.#sortField = sortField;
                 this.#sortOrder = "ASC";
             }
-            this.#loadRows();
+            this.#switchPage(1);
             this.#renderActiveSorting();
         }
         #renderActiveSorting() {