I'm attemtping to create a custom ComboBox control. The control will have a button on either side of the ComboBox itself, something like this:
[<-] [ --------------- V ] [->]
These buttons will be "next" and "previous" which will allow the user to quickly toggle between options in the dropdown (moving down and up respectively).
I've tried overriding the defaultAutoCreate config of the ComboBox, but I'm getting some odd behavior. Here's what I've tried so far: (this is all inside of a custom class extending ComboBox)
initComponent: function () {
// default ComboBox structure
var comboStructure = {
tag: 'span',
children: [
{ tag: 'a', cls: 'nav prev', html: 'Previous' },
{ tag: 'input', type: 'text', size: '24', autocomplete: 'off' },
{ tag: 'a', cls: 'nav next', html: 'Next' }
]
};
console.log(comboStructure);
var config = {
triggerAction: 'all',
lazyRender: true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: [
'myId',
'displayText'
],
data: [[1, 'Banner #1'], [2, 'Banner #2']]
}),
valueField: 'myId',
displayField: 'displayText',
defaultAutoCreate: comboStructure
};
Ext.apply(this, config);
IbwUi.controls.PreviewBannerSelectDropdown.superclass.initComponent(this);
}
The 2nd "child" of the comboStructure is actually the default value that gets initialized for ComboBox, I looked at the source code. The code works without error, but there's some odd behavior with the rendering of the combo itself, see here:

Any ideas on how to add my custom elements around the ComboBox when it renders?