fix FavGifSearch regression

This commit is contained in:
Vendicated 2025-09-09 03:56:53 +02:00
parent 8eabb11125
commit 479d01a1b9
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -30,6 +30,7 @@ interface SearchBarComponentProps {
onClear: () => void;
query: string;
placeholder: string;
className?: string;
}
type TSearchBarComponent =
@ -147,7 +148,7 @@ function SearchBar({ instance, SearchBarComponent }: { instance: Instance; Searc
// scroll back to top
ref.current?.containerRef?.current
.closest("#gif-picker-tab-panel")
?.closest("#gif-picker-tab-panel")
?.querySelector("[class|=\"content\"]")
?.firstElementChild?.scrollTo(0, 0);
@ -177,6 +178,7 @@ function SearchBar({ instance, SearchBarComponent }: { instance: Instance; Searc
ref={ref}
autoFocus={true}
size="md"
className=""
onChange={onChange}
onClear={() => {
setQuery("");