mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-17 16:45:48 +00:00
SearchBar focus fixed
This commit is contained in:
parent
05ae49cbdd
commit
d39c14b554
1 changed files with 3 additions and 3 deletions
|
|
@ -26,12 +26,12 @@ const SearchBar = React.memo(({ className }) => {
|
|||
}, [active]);
|
||||
const onQueryInputSubmit = React.useCallback(() => {
|
||||
window.location.replace(`#/search?q=${searchInputRef.current.value}`);
|
||||
}, [searchInputRef]);
|
||||
}, [searchInputRef.current]);
|
||||
React.useEffect(() => {
|
||||
if (active && focusable) {
|
||||
if (active && focusable && searchInputRef.current) {
|
||||
searchInputRef.current.focus();
|
||||
}
|
||||
}, [active, focusable]);
|
||||
}, [query, active, focusable, searchInputRef.current]);
|
||||
return (
|
||||
<div className={classnames(className, styles['search-bar-container'], { 'active': active })}>
|
||||
<label className={styles['search-label']}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue