Skip to content

[Bug]: Empty value options not hidden when selected in multi-select mode with allowEmptyOption enabled #930

@llr114

Description

@llr114

Bug description

When using Tom Select in multi-select mode with allowEmptyOption: true, options with empty values value="" are not properly removed from the dropdown menu after being selected, despite hideSelected being enabled by default in multi-select mode.

Expected behavior

In multi-select mode with allowEmptyOption: true, selected options with empty values should be hidden from the dropdown menu

Steps to reproduce

Select the "AA" option → observe it remains visible in dropdown

<select id="test" multiple>
  <option value="">AA</option>
  <option value="option1">Option 1</option>
  <option value="option2">Option 2</option>
</select>

<script>
new TomSelect('#test', {
  allowEmptyOption: true
});
</script>

Additional context

  • OS: macOS
  • Browser chrome
  • Version 2.4.3
  • Device: MacBook Air

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions