* added reset page to a search component * changed search file Co-authored-by: davitbejanyan <dbejanyan@provectus.com> Co-authored-by: Oleg Shur <workshur@gmail.com> Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
This commit is contained in:
parent
5a67adbf3e
commit
1b8ee3b672
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,9 @@ const Search: React.FC<SearchProps> = ({
|
||||||
onChange(e.target.value);
|
onChange(e.target.value);
|
||||||
} else {
|
} else {
|
||||||
searchParams.set('q', e.target.value);
|
searchParams.set('q', e.target.value);
|
||||||
|
if (searchParams.get('page')) {
|
||||||
|
searchParams.set('page', '1');
|
||||||
|
}
|
||||||
setSearchParams(searchParams);
|
setSearchParams(searchParams);
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
Loading…
Add table
Reference in a new issue