View Full Version : Combo dropdown seems to have a wrong size

6 Jan 2011, 6:04 AM
I have a combobox with a store that I manually updates. The store is updated from a out-of-house JSON webservice that does not provide the result as how ExtJS wants it. Thus I perform an AJAX request and manually inserts the response as records in the store.

When I input a search term, the combos list will be smaller than one line even though the list contains many records.


How can I make sure the list has the correct height?

xtype: 'combo',
id: 'mycombo',
fieldLabel: 'mylabel',
displayField: 'displayName',
valueNotFoundText: 'value not found',
listEmptyText: 'list empty',
loadingText: 'loading',
emptyText: 'input here',
enableKeyEvents: true,
anchor: '100%',
mode: 'local',
store: new Ext.data.ArrayStore(
fields: ['id', 'displayName', 'x', 'y'],
data: []
keyup: function (textfield, event) {
if (textfield.lastQuery != textfield.getRawValue()) {
scope: this

requestData: function (searchTerm) {
// Do AJAX request...
// ...

// On success:

fillSearchResults: function (results) {
var combo = Ext.getCmp('mycombo');

// Remove all previous records.
var recordType = combo.store.recordType;
for (var index = 0; index < results.length; index++) {
var result = results[index];
var record = new recordType({
id: index,
displayName: result.displayName,
x: result.x || 0,
y: result.y || 0

// Make sure the list is expanded.