Search code examples
extjscomboboxextjs4

I want to type <enter> in expanded combo box, and it should set empty value


Repro steps:

  1. Go to http://docs.sencha.com/extjs/4.2.0/extjs-build/examples/form/xml-form.html
  2. Click on trigger on State combo box field.
  3. Type enter key.

Expected result: Value should remain empty.

Actual result: Selects first item in list (Alabama)

How do I accomplish my expected result? Note that in my own application, I am using a time field, so I am not specifying my own list of items such that I could add an empty value. That is, unless there's an easy way to do this in the time field.


Solution

  • You can set

    autoSelect: false 
    

    to your select field. And then the first Item will not be selected.