fix FavGifSearch regression
This commit is contained in:
parent
8eabb11125
commit
479d01a1b9
1 changed files with 3 additions and 1 deletions
|
|
@ -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("");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue