mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: set page number to 1 when updating search string
This commit is contained in:
1 parent
7457786c5c
commit
6f7154a83a
2 files changed
+2
-1
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.37.3",
|
||||
"version": "4.37.4",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -56,6 +56,7 @@ async function updateSelection(sendRequest = true) {
|
||||
const url = new URL(window.location.href);
|
||||
if (!q) url.searchParams.delete('q');
|
||||
else url.searchParams.set('q', q);
|
||||
url.searchParams.delete('page');
|
||||
pjax.request({ url: url.toString() });
|
||||
$('[name="q"]').val(q);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user