react-native-tv-demo
react-native-tv-demo copied to clipboard
How to add more than a input on component
I'm trying this code, but it's not work
<TextInput
ref={inputTextRef}
nativeID={'component_text_input'}
placeholder={'TextInput'}
placeholderTextColor={'gray'}
clearButtonMode={'always'}
autoCorrect={false}
autoFocus={false}
style={styles.textInput}
/>
{Platform.OS === 'android' && (
<FocusableHighlight
onPress={() => {}}
onFocus={() => {
if (inputTextRef.current) {
inputTextRef.current.focus();
}
}}
style={styles.dummyButton}>
<Text />
</FocusableHighlight>
)}
<TextInput
ref={inputTextRef2}
nativeID={'component_text_input2'}
placeholder={'TextInput'}
placeholderTextColor={'gray'}
clearButtonMode={'always'}
autoCorrect={false}
autoFocus={false}
style={styles.textInput}
/>
{Platform.OS === 'android' && (
<FocusableHighlight
onPress={() => {}}
onFocus={() => {
if (inputTextRef2.current) {
inputTextRef2.current.focus();
}
}}
style={styles.dummyButton}>
<Text />
</FocusableHighlight>
)}