Value is not rendered when using <select> with nullable options
Version
3.1.5
Reproduction link
https://codepen.io/Livijn/pen/GRmxgMb
Steps to reproduce
Create a <select>
with an <option :value="null">
and check the rendered HTML.
What is expected?
The :value="null" should be rendered as :value="" so the form works when sending it with GET option.
What is actually happening?
When submitting the form when the nullable option is selected, the value of the select element will be the text of the option since no value is rendered. I think this was caused by #3564
having value=""
rendered with :value="null"
was a bug. You can still pass value=""
yourself and initialize the selected
to ""
Example
#3564 is an intentional change to align the behavior with this RFC.