So I know each combobox in ExtJS has a boundlist that can be gotten by grabbing the picker (combobox.getPicker()) How does one access the BoundListKeyNav though in order to see which one of the items is highlighted and such?
Here's what I'm trying to do:
In my combobox I have a listConfig in which I inject an item before the list so that you in essence have something like the following:
I figured out I can tell when I'm on the first element using the following:
<div id="boundlist-1098-listEl" class="x-boundlist-list-ct" style="overflow: auto; height: 299px;"> <div class="my-boundlist-item-menu" style="cursor:pointer;padding:2px;border:1px dotted #fff" onmouseover="this.className='my-boundlist-item-menu x-boundlist-item-over'" onmouseout="this.className='my-boundlist-item-menu'">Add New Address</div> <div class="x-boundlist-item" id="ext-gen1267">Item 1</div> <div class="x-boundlist-item">Item 2</div> <div class="x-boundlist-item">Item 3</div> <div class="x-boundlist-item">Item 4</div> </div>
That helps get me the index (and since I know we have 5 items I can theoretically know which one is last). I need someway to be able to use the keyboard to go up and down and still be able to select the first element.
Here's a JS fiddle to show a simple combobox: http://jsfiddle.net/Tyw34/1/ Notice how when you use the up/down keyboards it skips over the additional item I've added.
Does anyone have any ideas on how to make it so that it doesn't just skip around like that? I can't seem to get it to stop the trigger and I can't figure out how to access the KeyNav to be able to do it.
Thanks for any suggestions.