I´m using chosen.js for Dropdowns in a form on a grails-environment. I want the users to be able to select an empty option, but somehow it is ignored. There must be a possibility to do this? Because the workaround to set an option like "select-none" and later in data-bindig make a if condition if select-none value= "" would be unpretty.
to show my problem :
for example this select :
<g:select id="foo" data-placeholder="bar" class="foo chzn-select" style="width: 245px;" tabindex="4"
from="${['M', ' ', 'F']}" value="foo" name="titel"/>
would return :
Sure this is a nice feature of chosen, but i guess my case is a common case and maybe someone of you already has a solution to override this behaviour
thanks in advance
You can also set *allow_single_deselect* to true. This will have a 'x' that allows user to deselect the option.
$(".chzn-select").chosen({ allow_single_deselect:true });