How do you set the value with javascript of a react-select component with grouped options? Grouped options as in this post.
Edit in reply to comment by @Tholle
I did not mention that I'm using Typescript, because questions tend to get less answers I think.
This is how I'm using the component:
<Select
value={this.state.Industry}
options={this.industryOptions}
onChange={ (e) => this.handleChange("industry", e)}
></Select>
Where industryOptions is of this type:
industryOptions: Array<{label: string, options: Array<{label: string, value: string}>}>
E.g:
label: "Automotive"
options: Array(3)
0: {label: "Car brand", value: "77"}
1: {label: "Car dealer", value: "76"}
2: {label: "Other", value: "75"}
When selecting an option in the dropdown this.state.Industry changes, but nothing happens with the Select component when this.state.Industry is changed.