Closed robbporto closed 1 year ago
Is it possible to have a suffix option, similar to the already implemented prefix option for the createNumberMask function?
suffix
prefix
createNumberMask
Something like:
import MaskInput, { createNumberMask } from 'react-native-mask-input'; const dollarMask = createNumberMask({ suffix: ['%'], delimiter: '', separator: '', precision: 0, }) function MyComponent() { const [value, setValue] = React.useState(''); return ( <MaskInput value={value} mask={dollarMask} onChangeText={(masked, unmasked) => { setValue(unmasked); // you can use the masked value as well // assuming you typed "10": console.log(masked); // "10%" console.log(unmasked); // "10" }} /> ); }
no, it's not
Is it possible to have a
suffix
option, similar to the already implementedprefix
option for thecreateNumberMask
function?Something like: