CaioQuirinoMedeiros / react-native-mask-input

🎭:iphone: A simple and effective Text Input with mask for ReactNative on iOS and Android. Includes obfuscation characters feature.
https://www.npmjs.com/package/react-native-mask-input
MIT License
309 stars 31 forks source link

Masks that end with a string do not automatically fill the last character #21

Closed mmfire118 closed 2 years ago

mmfire118 commented 2 years ago

Using this mask for example:

const MASK = [/\d/, /\d/, ".", /\d/, "%"]

with an input of '221' outputs '22.1' NOT '22.1%'

The last character is only added after you input an additional character.

CaioQuirinoMedeiros commented 2 years ago

@mmfire118 it's not possible. See if this lib fits your case, it has suffix prop: https://github.com/CaioQuirinoMedeiros/react-native-currency-input