I am using a template that build on material ui. I try to put onChange in this code but it doesnt work. I also try to add onChange in customInput too but still doesnt work. I am think to put onChang inside inputProps but I have no idea how to put function in object.
handleChange = e => {
const {name, value} = e.currentTarget;
this.setState({[name]: value});
};
......
<CustomInput
labelText="Username"
id="username"
name='username'
**onChange = {e =>this.handleChange(e)}
formControlProps={{
fullWidth: true
}}
inputProps={{
value: `${this.state.user.username}`,
}}
/>
How can I fix this problem?Thanks
**beforeonChangealso do you receiveconst {name, value}?