React Material-UI how to save TextFields in Typescript

0

Issue

How can I save an input with Material-UI TextFields in Typescript. My idea was to have a default value in the TextField and with a button, it should save the new value from the user.

Solution

you should use onChange for Textfields

onChange={(e)=>this.saveTextFields(e.target.value)}

Answered By – Seyed Kazem Mousavi

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More