我有一个组合框,具有以下配置。ExtJs4 - 自动完成ComboBox不显示空文本
{
fieldLabel:'Service',
xtype:'combo',
displayField: 'srvcDesc',
store: storeServiceCodeVar,
valueField:'srvcCD',
id:'serviceCodeId',
name:'serviceCodeName',
queryMode: 'remote',
queryDelay:100,
typeAhead: true,
minChars:0,
hideTrigger:true,
forceSelection:true,
maxHeight:23,
deferEmptyText:false,
autoSelect:true,
fieldStyle:'text-transform:uppercase',
listConfig: {
loadingText: 'Loading...',
// Custom rendering template for each item
getInnerTpl: function() {
return '<table width="200px"><tr><td height="5"></td></tr><tr valign="top"><td>Code:{srvcCD}</td></tr><tr><td height="2"></td></tr><tr valign="top"><td>Description:{srvcDesc}</td></tr><tr><td height="5"></td></tr></table>';
},
emptyText:'No Values Found'
}
}
的问题是,当没有从服务器返回的数据,然后emptyText(其值 - 没有找到值)被显示可能是一个毫秒和熄灭。我希望它留在那里直到下一个查询被解雇。这怎么可能。我用deferEmptyText尝试过,但没有运气。
有人可以对此有所了解。我使用的是ExtJS 4,在IE9和Mozilla中行为相同。
在此先感谢。
也在苦苦挣扎着;它看起来像预期的那样将emptyText值添加到了DOM,但是当从服务器没有返回记录时,包含元素的高度被设置为0。目前通过Ext JS 4源代码寻找灵感...... –