Hello there,
When this component is initially mounted the setSelected function is executed. Is this how it is supposed to behave?
I believe the setSelected function should only execute whenever the user selects a new option from the dropdown since this function is currently the only way to get the selected value. Having it run on mount leads to some nasty bugs.
Thank you!