Hi, the _defaultValue_ attribute for <select> does not work in preact: https://stackblitz.com/edit/preact-bug-defaultvalue-zn7r9a .
Switching to a selected attribute (in <option> ) seems to work but causes some strange behaviour on late renderings (no sandbox yet).
Does defaultValue even exist for <select>?
It might be some special handling react does
Hi @ForsakenHarmony , yes it exists; React even asked me (with a console warning) to replace <option default... /> by defaultValue during my tests ;-) .
Edit - Here is the React warning:
Warning: Use the "defaultValue" or "value" props on <select> instead of setting "selected" on <option>.
Hello there, If this issue is up for taking I would like to help.
Most helpful comment
To be clear for anyone looking to work on this,
defaultValueon<select>is not a DOM prop (MDN) but is something React supports, so support fordefaultValueon<select>needs to be inpreact/compat.<option>does have adefaultSelectedproperty (MDN), but not sure what React does with this.