How to change TextInput cursor position in React Native?
问题 I am trying to achieve this behaviour in React Native: The user type for example 5 then ".000" will be added automatically to the TextInput , but the user can add an other number for example 7, the final result should look like "57.000". I tried to find a workaround but calculating the length of value and add chars accordingly but it didn't work as expected. Then I found the selection props of the TextInput . Here is my take on this: I added this to state selection: { start: 0, end: 0 } Here