File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1+ Autofocus search on home page
Original file line number Diff line number Diff line change @@ -19,13 +19,15 @@ export interface SearchProps {
1919 disabled ?: boolean
2020 onFocusChange ?: ( hasFocus : boolean ) => void
2121 expandable ?: boolean
22+ autoFocus ?: boolean
2223}
2324
2425export const Search : FC < SearchProps > = ( {
2526 scope,
2627 expandable,
2728 disabled,
2829 onFocusChange : onFocusChangeProp ,
30+ autoFocus,
2931} ) => {
3032 const { t } = useTranslation ( )
3133 const navigate = useNavigate ( )
@@ -86,6 +88,7 @@ export const Search: FC<SearchProps> = ({
8688 ) }
8789 size = "lg"
8890 onChange = { onChange }
91+ autoFocus = { autoFocus }
8992 onFocus = { ( ) => onFocusChange ( true ) }
9093 onBlur = { ( ) => onFocusChange ( false ) }
9194 placeholder = { searchPlaceholderTranslated }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const HomeSearch: FC = () => {
2525 { t ( 'home.search' ) }
2626 </ Typography >
2727
28- < Search disabled = { ! isApiReachable } />
28+ < Search disabled = { ! isApiReachable } autoFocus />
2929 </ div >
3030 )
3131}
You can’t perform that action at this time.
0 commit comments