1+ import { SearchField } from "../../components/ui/SearchField" ;
12import { Toolbar } from "../../components/ui/Toolbar" ;
23import { ScreenScrollView as ScrollView } from "../../components/ui/ScreenScrollView" ;
34import { LegendList } from "@legendapp/list/react-native" ;
@@ -9,12 +10,12 @@ import {
910 thirdPartyLicenseEntryKey ,
1011 type ThirdPartyLicenseEntry ,
1112} from "@t3tools/shared/thirdPartyLicenses" ;
12- import { useCallback , useMemo , useState } from "react" ;
13- import { Linking , Platform , Pressable , View } from "react-native" ;
13+ import { useCallback , useMemo , useRef , useState } from "react" ;
14+ import { Linking , Platform , Pressable , type TextInputInstance , View } from "react-native" ;
1415import { useSafeAreaInsets } from "react-native-safe-area-context" ;
1516
1617import { SymbolView } from "../../components/ui/AppSymbol" ;
17- import { AppText as Text , AppTextInput as TextInput } from "../../components/ui/AppText" ;
18+ import { AppText as Text } from "../../components/ui/AppText" ;
1819import { ListRow } from "../../components/ui/ListRow" ;
1920import { SettingsScreen } from "./components/SettingsScreen" ;
2021import { NativeStackScreenOptions } from "../../native/StackHeader" ;
@@ -52,6 +53,7 @@ function LicenseRow(props: {
5253}
5354
5455export function SettingsOpenSourceLicensesRouteScreen ( ) {
56+ const searchRef = useRef < TextInputInstance > ( null ) ;
5557 const navigation = useNavigation ( ) ;
5658 const insets = useSafeAreaInsets ( ) ;
5759 const [ query , setQuery ] = useState ( "" ) ;
@@ -153,14 +155,13 @@ export function SettingsOpenSourceLicensesRouteScreen() {
153155 ListHeaderComponent = {
154156 Platform . OS !== "ios" ? (
155157 < View className = "px-5 pt-4 pb-5" >
156- < TextInput
158+ < SearchField
159+ inputRef = { searchRef }
160+ autoFocus = { false }
157161 accessibilityLabel = "Search open-source licenses"
158- autoCapitalize = "none"
159- autoCorrect = { false }
160- clearButtonMode = "while-editing"
162+ clearAccessibilityLabel = "Clear package search"
161163 onChangeText = { setQuery }
162164 placeholder = "Search packages"
163- returnKeyType = "search"
164165 value = { query }
165166 />
166167 </ View >
0 commit comments