I have this JSON returned from the server:
[
{
"symbol":"one option"
},
{
"symbol":"second option"
}
.......
]
I tried to display the data into dropdown using:
<Select
value={props.selectedData}>
{props.availableData.map((option) => (
<option value={option.symbol}>{option.symbol}</option>
))}
</Select>
But I get error:
Warning: Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.
Do you know how I can fix this?