Issue
I have a TextInput in react-native , I want to enter a number in order as 0.00 => 0.01 => 0.12 => 1.23 => 12.34 => 123.45 like this on each change text . CSS Direction "rtl" is not working . Looking for an algorithm to apply in my JS file for react-native textInput on
onChangeText={(amount) => this.onChangeText(amount)}
onChangeText = (amount) => {
//. Logic for reverse goes here
this.setState({
amount: newAmount,
amountError: false,
});
};
Solution
You will need an input mask. You can write by yourself or implement the npm package react-text-mask into your project. Take the following example, you can twist it to match what you're looking for, which is quite similar.
Answered By - Jesus Santander
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.