-
7 May 2012 6:00 AM #1
Combobox is not scrolled automatically to the selected item.
Combobox is not scrolled automatically to the selected item.
Hi,
I want combobox to show currently selected item on top of the drop-down list.
Say, I have 100 items in my combobox, item 70 is selected but it is not shown to the user just after down arrow is clicked and list is expanded, user needs to scroll the list down in order to find currenly selected item.
Is it possible to bring the selected item on top of the list?
Thanks.
-
14 May 2012 3:11 AM #2
-
16 May 2012 5:34 PM #3
I recall this was an issue with older version of ExtJS4, but it should be resolved. What version you are using?
Scott.
-
11 Sep 2012 9:49 AM #4
You could try something like the following:
But using local queryMode you should never have to scroll to the selection.Code:Ext.create('Ext.form.ComboBox', { fieldLabel: 'Choose State', store: states, queryMode: 'local', displayField: 'name', valueField: 'abbr', renderTo: Ext.getBody(), listeners: { select: function (combo, records, eOpts) { var node = combo.picker.getNode(records[0]); combo.picker.listEl.insertFirst(node); } } })
-
11 Sep 2012 10:08 AM #5
I was experiencing the same.. Code helped me out, thanks!!


Reply With Quote