[Dropdown] "set selected" does not work for empty ('') value (using placeholder: false)
http://jsfiddle.net/y7axjw2y/2/
I am using .ui.selection.dropdown with placeholder:false to have the empty value option in the list. User can select it to set value ''. But I am not able to set this option in code. In fact the component is not able to do it it self on initiate. If I set any other value as the value of hidden input it is selected as option on start and the onchange event is called on the input. But by using '' for the value='' option it does not work.
Calling .dropdown('set selected', '') does not work.
In fact calling .dropdown('clear') does not work, if there is not the div with class "default text" and any non empty content. <div class="default value"></div> does not work too.
So the empty value option is possible to have in the list now, but it is not fully supported by the component.
In any case thank you for all nice component and this one as well!!!
Demo with next branch. @michtill Let me know if this makes sense.
http://jsfiddle.net/ud2qxebd/
Clear will now correctly set value to "" when no placeholder. Fixed several placeholder issues, particularly with restore defaults.
Available in 2.1
Hello,
Works now perfectly.
Thank you very much!
Michal Tiller Dne 12. 8. 2015 0:17 napsal uživatel "Jack Lukic" <[email protected]
:
Demo with next branch. @michtill https://github.com/michtill Let me know if this makes sense. http://jsfiddle.net/ud2qxebd/
Clear will now correctly set value to "" when no placeholder. Fixed several placeholder issues, particularly with restore defaults.
Available in 2.1
— Reply to this email directly or view it on GitHub https://github.com/Semantic-Org/Semantic-UI/issues/2637#issuecomment-130094007 .
Glad to know :)