Closed VaiteaBimOne closed 1 year ago
I tried different example et tried with a custom mask. Everything is working fine but if I have a mask to allow only numerical character for example, adding a letter will show fro a split second before being removed.:
https://github.com/CaioQuirinoMedeiros/react-native-mask-input/assets/128174796/9cf59855-1b72-4fe3-a95a-2442e51c1bad
const [creditCard, setCreditCard] = React.useState(''); return ( <MaskInput value={creditCard} onChangeText={(masked, unmasked) => { setCreditCard(masked); // you can use the unmasked value as w // assuming you typed "9" all the way: console.log(masked); // (99) 99999-9999 console.log(unmasked); // 99999999999 }} mask={['(', /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]} /> );
Thanks!
Welcome to React Native
I tried different example et tried with a custom mask. Everything is working fine but if I have a mask to allow only numerical character for example, adding a letter will show fro a split second before being removed.:
https://github.com/CaioQuirinoMedeiros/react-native-mask-input/assets/128174796/9cf59855-1b72-4fe3-a95a-2442e51c1bad
Thanks!