我有一个组合框,其中值显示在模板中。
现在,我想的模板的宽度比组合框的更多,因此我使用matchFieldWidth:假在链路中提到 - ExtJS ComboBox dropdown width wider than input box width?
但是,当我这样做,然后在值列表中没有显示滚动条,因此用户只能看到前两个值。一旦matchFieldWidth:false被删除,完整的列表就会显示出来,但是模板的宽度会减少到组合框的宽度,这不是我们想要的。
下面是我的代码:
xtype: 'combo',
id: 'testId',
name: 'testName',
displayField: 'vslCd',
valueField: 'vslCd',
fieldLabel: 'Vessel Code',
store: storeVesselCodeVar,
matchFieldWidth: false,
queryMode: 'remote',
listConfig: {
loadingText: 'Loading...',
width: 400,
autoHeight:true,
getInnerTpl: function() {
return '<table><tr><td height="5"></td></tr><tr valign="top"><td>Vessel Code:{vslCd}</td></tr><tr><td height="2"></td></tr><tr valign="top"><td>Vessel Name:{vslNm}</td></tr><tr><td height="5"></td></tr></table>';
}
}
任何人都可以请建议,有什么可这背后,如何之所以要解决这个问题?附件是与问题相关的截图。
我正在使用这个ExtJS4和IE9。
我已经能够通过向我的模板添加高度来解决此问题。希望这可以帮助别人。 – netemp
您应该将此解决方案作为答案发布并接受它,以帮助其他用户找到此问题的正确答案。 – suknic
当然,感谢分享。 – netemp