Skip to content

allowEmptyOption does not treat empty options as normal options #739

Closed
@esbenp

Description

@esbenp

According to the documentation allowEmptyOption:true should enable empty value options being treated as normal options. However, it seems they are still not selectable.

This demo is taken straight out of the examples folder:

<div class="control-group">
    <label for="select-beast-empty">Beast:</label>
    <select id="select-beast-empty" class="demo-default" data-placeholder="Select a person...">
        <option value="">None</option>
        <option value="4">Thomas Edison</option>
        <option value="1">Nikola</option>
        <option value="3">Nikola Tesla</option>
        <option value="5">Arnold Schwarzenegger</option>
    </select>
</div>
<script>
$('#select-beast-empty').selectize({
    allowEmptyOption: true,
    create: true
});
</script>

Here none is not actually a clickable option. It disappears once the dropdown is activated, and thus seems more like a placeholder? Is this the wanted behaviour or did I miss something here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions