- 模仿位址:https://blog.csdn.net/fengoh/article/details/34860613
- 設定的matchFieldWidth=false會随着資料長度改變寬度,資料如果很短會導緻清單顯示不完整,很長則會超長;設定的matchFieldWidth=true則固定于文本框一樣長,如果文本框不夠長,則限制了下拉清單無法全部展現。
-
關鍵代碼:
{
xtype : 'combobox',
width : 260,
fieldLabel : '<label style="color:red">*</label>特征類型',
labelAlign : 'right',
id:'productFeatureTypeId',//定義上下文查找ID
name : 'productFeatureTypeId',//表單送出ID
hiddenName:'productFeatureTypeId',
displayField : 'description',
store : 'feature.combobox.ParentTypeStore',
allowBlank: false,
matchFieldWidth: false,
forceSelection: true,
minChars: 1,
pageSize: 10,
queryMode: 'local',
ypeAhead: true,
valueField : 'productFeatureTypeId',
selectFlag:true,//很關鍵,由于文本資料改變事件執行的優先級别比較高,需要根據一個标記來判斷是否需要輸入資料
- }