Skip to content

Files

Latest commit

a16e447 · May 26, 2020

History

History
This branch is 177 commits ahead of, 5 commits behind ttdung11t2/react-native-confirmation-code-input:master.

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 28, 2020
May 26, 2020
May 26, 2020

Underline example

react-native-confirmation-code-field underline example

React Native have issue with border styles for <Text/> on iOS.

To fix it need <View/> wrapper for Cell, but don't forger to move onLayout={getCellOnLayoutHandler(index) to <View/>:

// BAD 👎
renderCell={({index, symbol, isFocused}) => (
  <View key={index}>
    <Text
      onLayout={getCellOnLayoutHandler(index)}
    >
      {...}
    </Text>
  </View>
)}


// GOOD ✔️
renderCell={({index, symbol, isFocused}) => (
  <View
    key={index}
    onLayout={getCellOnLayoutHandler(index)}
  >
    <Text>{...}</Text>
  </View>
)}