Skip to content

Commit

Permalink
Reset scroll position when changing the search term (#382)
Browse files Browse the repository at this point in the history
I hate my life (f5a8c8d)... AINTNOWAY
  • Loading branch information
schroda authored Jun 19, 2023
1 parent 322cf8c commit ed9c51c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/screens/SourceMangas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
Expand Down

0 comments on commit ed9c51c

Please sign in to comment.