tags:

views:

436

answers:

1

I'm using ExtJS to create an EditorGridPanel with a combobox for an editor in a cell.

The combobox in my EditorGridPanel that is not working as I'd expect it to.

When the user types the first letter of an item in the drop down list, the combobox seems to ignore it and select the first item in the list. I can reproduce the error consistently and have put together a test case here: http://cluebucket.com/dev/testcase/testcase.html

Load the page and reproduce the behavior by the following -- note that this is all done using the keyboard, no mouse clicks:

  1. Click 'Add Record' (A new row is added to the grid)
  2. enter text in the text field.
  3. TAB to the Priority field without selecting anything (None will remain selected)
  4. TAB out of the Priority field. (A new row is added to the grid)

  5. enter text and TAB to the Priority field

  6. TYPE v (Very High is selected)
  7. TAB out of the priority field (A new row is added to the grid)
  8. enter text and TAB to the Priority field
  9. Type v (None is selected, but Very High should have been)

  10. TAB out of the priority field

  11. Enter text and TAB to the priority field
  12. Type l ('el') (Low is selected)
  13. TAB out, enter text, TAB to priority
  14. Type l (None is selected)

It appears that whenever the user attempts to select the same value that was selected in the previous row, the combobox selects None.

Any ideas? The code is available at cluebucket.com/dev/testcase/js/testcase.js

Thoughts/Pointers/Corrections are appreciated!!

thanks

tom

A: 

By adding the follwing to the combobox config, I seem to have removed the problem.

listeners: { // delete the previous query in the beforequery event beforequery: function(qe){ delete qe.combo.lastQuery; } }

I'm supposing that since the same CB is being used over and over (instead of a new one being instantiated) that somehow the query that the CB is using to select from the list is getting horked up in a way that it doesn't recognize a previously selected item (??) Dunno.

If anyone has any insight, I'd really appreciate the info.

thanks

tom

TomH