selectize.js icon indicating copy to clipboard operation
selectize.js copied to clipboard

Make possible to disable the autocomplete dropdown

Open mcalello opened this issue 10 years ago • 10 comments

If I do not have options but still want to use selectize for tagging, can I turn off the options dropdown and the option_create altogether?

mcalello avatar Jan 08 '16 02:01 mcalello

I'm looking for this too

ErwanGuillon avatar Jan 12 '16 09:01 ErwanGuillon

Have you found a way to disable it? Otherwise sounds like an enhancement

joallard avatar Jan 21 '16 15:01 joallard

I have not. Been just living with the dropdown appearing as the user types with the "Add abc ..." showing.

mcalello avatar Jan 24 '16 02:01 mcalello

@ErwanGuillon, @mcalello lets try this selectize.$control_input.on('keypress', function() { selectize.close(); }); selectize.on('type', function() { selectize.close(); }); + openOnFocus: false,

uvarovkv avatar Mar 28 '16 11:03 uvarovkv

Sounds like this would be easy if we refactor Selectize into components, but not quite yet. Meanwhile, let us know how the workaround works!

joallard avatar Apr 01 '16 19:04 joallard

+1 for this option. On mobile the keyboard comes up because of the filter option, which is not needed on small dropdowns.

defaria avatar Jun 20 '16 18:06 defaria

This works fine:

onDropdownOpen: function(dropdown) {
  dropdown.remove();
}

Jeiwan avatar Jun 29 '16 06:06 Jeiwan

This works fine:

onDropdownOpen: function(dropdown) {
  dropdown.remove();
}

Unfortunately this doesn't prevent selectize to insert an item by autocomplete on Enter-keypress. Isn't there any possibility to disable it at all?

nd-ffx avatar Aug 18 '16 18:08 nd-ffx

@nd-ffx try this instead:

onDropdownOpen: function() {
  this.close();
}

Edit: Never mind, this seems to cause issues deselecting the input afterwards.

awdyer avatar Sep 19 '16 22:09 awdyer

closing stale issues older than one year. If this issue was closed in error please message the maintainers. All issues must include a proper title, description, and examples.

risadams avatar Nov 12 '20 14:11 risadams