I create form, I have several TextField, DropDownMenu material-ui components included, question is how I can collect all data from all TextFields, DropDownMenus in one obj and s
Faced to this issue after a long time since question asked here. when checking material-ui code I found it's now accessible through inputRef
property.
...
{this.myRefs.username = c}}
label="Username"
placeholder="xxxxxxx"
margin="normal"
className={classes.textField}
variant="outlined"
fullWidth
/>
...
Then Access value like this.
onSaveUser = () => {
console.log('Saving user');
console.log(this.myRefs.username.value);
}