From ed9c51cd37afbb9f84682ff48378f722b847cc15 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Tue, 20 Jun 2023 01:12:10 +0200 Subject: [PATCH] Reset scroll position when changing the search term (#382) I hate my life (f5a8c8d35c113aca2643f3e6e1b54611bb1a8db7)... AINTNOWAY --- src/screens/SourceMangas.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/screens/SourceMangas.tsx b/src/screens/SourceMangas.tsx index 66c4289d..9ce8d96d 100644 --- a/src/screens/SourceMangas.tsx +++ b/src/screens/SourceMangas.tsx @@ -256,6 +256,7 @@ export default function SourceMangas() { // with strict mode + dev mode the first request will be aborted. due to using SWR there won't be an // immediate second request since it's the same key. instead the "second" request will be the error handling of SWR abortRequest(new Error(`SourceMangas(${sourceId}): search string changed`)); + setResetScrollPosition(true); }, [searchTerm, contentType], );