react-native-tv-demo icon indicating copy to clipboard operation
react-native-tv-demo copied to clipboard

How to add more than a input on component

Open kungfu321 opened this issue 4 years ago • 0 comments

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>
      )}

kungfu321 avatar Apr 20 '21 05:04 kungfu321