When I create a selectmenu, for example with 1 option like this:
precode
List.empty();
List.append('<option value="">Testoption</option>');
/code/pre
Shows this in HTML: , and the option is not shown in the list.:
precode
<option value="" data-placeholder="true">Favorieten</option>
/code/pre
When I create exactly the same, but with something in the value attribute:
precode
List.empty();
List.append('<option value="test">Testoption</option>');
/code/pre
I get the correct HTML and the option is visible in the list:
precode
<option value="test">Favorieten</option>
/code/pre
What do I have to do if I want an option with an empty value? Because my database returns sometimes empty strings, which are placed in the value attribute.
And I don't want to change the empty string into something else, because I want the selectmenu.val() to be the empty string when the option with the empty value is selected.