File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import HeaderWithBackButton from '@components/HeaderWithBackButton';
5
5
import ScreenWrapper from '@components/ScreenWrapper' ;
6
6
import type { SearchQueryJSON } from '@components/Search/types' ;
7
7
import TextInput from '@components/TextInput' ;
8
+ import useAutoFocusInput from '@hooks/useAutoFocusInput' ;
8
9
import useLocalize from '@hooks/useLocalize' ;
9
10
import useThemeStyles from '@hooks/useThemeStyles' ;
10
11
import * as SearchActions from '@libs/actions/Search' ;
@@ -20,6 +21,7 @@ function SavedSearchRenamePage({route}: {route: {params: {q: string; name: strin
20
21
const styles = useThemeStyles ( ) ;
21
22
const { q, name} = route . params ;
22
23
const [ newName , setNewName ] = useState ( name ) ;
24
+ const { inputCallbackRef} = useAutoFocusInput ( ) ;
23
25
24
26
const applyFiltersAndNavigate = ( ) => {
25
27
SearchActions . clearAdvancedFilters ( ) ;
@@ -62,6 +64,8 @@ function SavedSearchRenamePage({route}: {route: {params: {q: string; name: strin
62
64
accessibilityLabel = { translate ( 'search.searchName' ) }
63
65
role = { CONST . ROLE . PRESENTATION }
64
66
onChangeText = { ( renamedName ) => setNewName ( renamedName ) }
67
+ ref = { inputCallbackRef }
68
+ defaultValue = { name }
65
69
/>
66
70
</ FormProvider >
67
71
</ ScreenWrapper >
You can’t perform that action at this time.
0 commit comments