Skip to content

Option 'searchEnabled' set to false, but search is still enabled #1042

@nickbo90

Description

@nickbo90

Describe the bug
searchEnabled is set to false. But there is still a searchbox added

To Reproduce

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/choices.js/public/assets/styles/choices.min.css" />
<script src="https://cdn.jsdelivr.net/npm/choices.js/public/assets/scripts/choices.min.js"></script>
<select name="test" id="test" multiple>
	<option value="1">Option 1</option>
	<option value="2">Option 2</option>
	<option value="3">Option 3</option>
</select>

<script>
	const choices = new Choices(document.getElementById('test'), {
		silent: false,
		searchEnabled: false,
		delimiter: '|',
	});
</script>

Expected behavior
No search input generated ( <input type="search" name="search_terms" ...> ). I would like to generate a multi-select dropdown without a searchfield.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: 102.0.5005.115 (Officiële build) (64-bits)

Additional context
Some config options are working, but the delimiter config value isn't working for example. Also would I like to disable the 'Press to select' text inside the dropdown. But I can't disable it with 'renderSelectedChoices'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions