Search code examples
extjsextjs4extjs5

Disable editing on combobox but still allowing search:possible?


I don't want to allow my user to freely write everything they please on the combobox, and I know that with:

editable: false

I can make this component not editable. However, this disables the useful search function as well! User should be still allowed to freely write in the combo in order to search for a certain field. Is there a way to allow search but still prevent that the words used for searching become the combobox value?


Solution

  • You can set the forceSelection config on the combobox to true. This will prevent the user from entering any value not in the list, but the user is still able to filter the dropdown like they would in free-form comboboxes.