mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
focus search bar on focus screen
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
import colors from '@app/styles/colors'
|
||||
import font from '@app/styles/font'
|
||||
import React from 'react'
|
||||
import { TextInput as ReactTextInput, StyleSheet, StyleProp, TextStyle, KeyboardTypeOptions } from 'react-native'
|
||||
import { TextInput as ReactTextInput, StyleSheet, KeyboardTypeOptions, StyleProp, TextStyle } from 'react-native'
|
||||
|
||||
const TextInput = React.memo<{
|
||||
style?: StyleProp<TextStyle>
|
||||
value?: string
|
||||
placeholder?: string
|
||||
onChangeText?: (text: string) => void
|
||||
onSubmitEditing?: () => void
|
||||
keyboardType?: KeyboardTypeOptions
|
||||
}>(({ style, value, placeholder, onChangeText, onSubmitEditing, keyboardType }) => {
|
||||
const TextInput = React.forwardRef<
|
||||
ReactTextInput,
|
||||
{
|
||||
style?: StyleProp<TextStyle>
|
||||
value?: string
|
||||
placeholder?: string
|
||||
onChangeText?: (text: string) => void
|
||||
onSubmitEditing?: () => void
|
||||
keyboardType?: KeyboardTypeOptions
|
||||
}
|
||||
>(({ style, value, placeholder, onChangeText, onSubmitEditing, keyboardType }, ref) => {
|
||||
return (
|
||||
<ReactTextInput
|
||||
ref={ref}
|
||||
style={[style, styles.textInput]}
|
||||
placeholder={placeholder}
|
||||
placeholderTextColor="grey"
|
||||
|
||||
Reference in New Issue
Block a user