secureTextEntry not working
Closed this issue · 2 comments
gandarain commented
I try use secureTextEntry={true} but didnt work
Platform emulator android
import React, { useState } from 'react';
import { View, Dimensions } from 'react-native';
import OtpInputs from 'react-native-otp-inputs';
const OtpScreen = () => {
const screenWidth = Dimensions.get('window').width;
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<OtpInputs
handleChange={code => console.log(code)}
numberOfInputs={6}
inputStyles={{
borderColor: 'black',
borderWidth: 1,
borderRadius: 5,
margin: 10,
width: screenWidth / 10,
textAlign: 'center',
fontSize: 22,
backgroundColor: 'grey',
}}
style={{
paddingHorizontal: 30,
width: screenWidth / 1,
flexDirection: 'row',
}}
secureTextEntry={true}
/>
</View>
);
};
export default OtpScreen;
shivchawla commented
It's a problem with TextInput field (React-Native Issue#26799)
Use KeyboardType="numeric"
ice-chillios commented
Explained here: #23