mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
Fix original search params from being replaced
This commit is contained in:
parent
3aec139f58
commit
f9338aafcd
2 changed files with 19 additions and 10 deletions
|
|
@ -130,7 +130,13 @@ export const AlbumListGridView = ({ gridRef, itemCount }: any) => {
|
|||
const handleGridScroll = useCallback(
|
||||
(e: ListOnScrollProps) => {
|
||||
if (id) {
|
||||
setSearchParams({ scrollOffset: String(e.scrollOffset) });
|
||||
setSearchParams(
|
||||
(params) => {
|
||||
params.set('scrollOffset', String(e.scrollOffset));
|
||||
return params;
|
||||
},
|
||||
{ replace: true },
|
||||
);
|
||||
} else {
|
||||
setGrid({ data: { scrollOffset: e.scrollOffset }, key: pageKey });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue