`defaultValue` or `value` props on <select> instead of setting `selected` on <option>. code example
Example: Use the `defaultValue` or `value` props on instead of setting `selected` on .
whatever by Brainy Beetle
on Apr 20 2021 Donate
Comment
0
Source: stackoverflow.com
<select defaultValue={'DEFAULT'} >
<optionvalue="DEFAULT"disabled>Choose a salutation ...</option><optionvalue="1">Mr</option><optionvalue="2">Mrs</option><optionvalue="3">Ms</option><optionvalue="4">Miss</option><optionvalue="5">Dr</option></select>