ui: set page number to 1 when updating search string

This commit is contained in:
undefined committed 2022-05-13 13:17:53 +08:00
1 parent 7457786c5c
commit 6f7154a83a
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -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);
}