I am using a React class based component and material UI to display the dropdown. I am originally setting a default value and the select dropdown values get changed according to user click. However, I want to change the values programmatically, for eg. - I want to do something like I change the value in a variable, eg - age=40, and the dropdown which earlier had age=30 choses, now automatically reflects the value 40. Can anyone suggest please?
I tried passing value={this.age} in the option. And changed the value of this.age to 40 somewhere in the code programatically, however the drop-down still displays the value 30 for me
ageinthis.state, and updating it viathis.setState?