我有一個組合框,其中值顯示在模板中。
現在,我想的模板的寬度比組合框的更多,因此我使用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