I'm trying to format numbers dynamically when user enters or changes an input string field. I'm using React and a library NumeralJS for number formatting. I also use react-jsonSchema-form and I override theirs' number field. I am stuck with the non-user-friendly way of moving the cursor either at the end or in the begging of the input value depending on if I change the thousands or the numbers after the decimal separator. Is there any proper solution for that?
For example (adding a number in the integer part the cursor is moved to the end of the number):
ANSWER: I found a nice library for ReactJS which made the user interface friendly and it takes like 1 min to implement. I recommend it. https://github.com/s-yadav/react-number-format