ExtJS: Combobox in EditorGridPanel not selecting the desired item (with test case)
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:
- Click 'Add Record' (A new row is added to the grid)
- enter text in the text field.
- TAB to the Priority field without selecting anything (None will remain selected)
TAB out of the Priority field. (A new row is added to the grid)
enter text and TAB to the Priority field
- TYPE v (Very High is selected)
- TAB out of the priority field (A new row is added to the grid)
- enter text and TAB to the Priority field
Type v (None is selected, but Very High should have been)
TAB out of the priority field
- Enter text and TAB to the priority field
- Type l ('el') (Low is selected)
- TAB out, enter text, TAB to priority
- Type l (None is selected)
It appears that whenever the user attempts to select开发者_如何学Python 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
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
精彩评论