My code looks like
placeholder="select banana or apple or cat"
options=[
{label : "Apple", value=2},
{ label : "Banana", value=3 },
{ label : "Cat", value=5}
]
value = { this.state.selectedOptions}
isSearchable={false}
isDisabled={this.state.isEdit === true}
and an onChange event. I am having an array called "result" which is storing a property called "list". This list is an array that contains "Entity-Type". If the Entity-type is 2 I should get Apple, if it's 3 I should get Banana, If it's 5 I should get cat. I need to set the state to map my options and Entity-Type. I don't know how to do that as I am new to react. I am able to see the Entity-Type in my response tab in dev tools but I am not seeing the selected option in my UI. I can see the option that I selected in before saving the package but after saving the package, whenever I want to Edit it I can see only placeholder there that is disabled. My package should have only one type of option. I have a heads up that is I should use result.list[0].EntityType.value for mapping.