This question is for Experience Builder Dev Edition 1.8.
I'm just starting to learn to develop custom widgets in ExpBuilder and I'm struggling with some concepts. I've managed to figure out how to change the inner text of some jimu-ui elements programmatically. For example, I can change the inner text of this button <Button>{this.state.buttonLabel}</Button> by calling this.setState({ buttonLabel: 'Start'}).
Is it possible to change the value of a jimu-ui Select programmatically?
Solved! Go to Solution.
@Danik-B Sure you do it the same way set the value of the Select to a state property.
this.setState({value: x});
<Select value={this.state.value} ...
@Danik-B Sure you do it the same way set the value of the Select to a state property.
this.setState({value: x});
<Select value={this.state.value} ...
That's pretty easy! I think I got confused because the jimu-ui Select is not an html select and I didn't know if it could be controlled the same way. Thanks!