I have 3 input text fields namely “Mtr”, “Inches”, “Feet”. I want user to enter one of the input field and then press a “calculate” button against each text field
When I give input in “Mtr” and press “Calculate” the values of “Inches” and “Feet” should be set to zero value and they are working fine.
Once I manually typed a number in the Input text I am unable to reset its value to zero using Set State. Any reason why the setstate in the input text doesnt work once I manually typed some value in it?
Hi @ademiguel this solves half my problem. The other problem is once I put cursor on the input text and enter some value, post this I am unable to change the content/text in the input text using the set state
I have an input text and using set state I am assigning an integer (example: assigned number 0) to it and it works perfect
Now I have number 0 in the input text and using a button I am changing the state to number 1 and it works perfect (purpose of button click is to assign the number 1 to the input text)
Now I place the cursor on the input text and randomly type a number say “123” and the input text shows “123”. Now I click a button whose purpose is to assign the value of number 1 to input text doesnt work
Hope you understood the scenario. If not I will make a video