Extjs combobox的属性设置

// The data store containing the list of states
var states = Ext.create(‘Ext.data.Store’, {
fields: [‘abbr’, ‘name’],
data : [
{“abbr”:“AL”, “name”:“Alabama”},
{“abbr”:“AK”, “name”:“Alaska”},
{“abbr”:“AZ”, “name”:“Arizona”}

]

});

// Create the combo box, attached to the states data store
Ext.create(‘Ext.form.ComboBox’, {
fieldLabel: ‘Choose State’,
store: states,
queryMode: ‘local’,
displayField: ‘name’,
valueField: ‘abbr’,
renderTo: Ext.getBody()
});
模糊搜索属性
typeAhead : Boolean
true to populate and autoselect the remainder of the text being typed after a configurable delay (typeAheadDelay) if it matches a known value.(如果与已知值匹配,则在可配置延迟(typeAheadDelay)之后填充并自动选择要键入的文本的其余部分。)
Defaults to: false

typeAheadDelay : Number
The length of time in milliseconds to wait until the typeahead text is displayed if typeAhead = true
Defaults to: 250
多选属性
multiSelect : Boolean
If set to true, allows the combo field to hold more than one value at a time, and allows selecting multiple items from the dropdown list. The combo’s text field will show all selected values separated by the delimiter.(如果设置为true,则允许组合字段一次保存多个值,并允许从下拉列表中选择多个项。组合框的文本字段将显示由分隔符分隔的所有选定值。)
Defaults to: false
matchFieldWidth : Boolean
Whether the picker dropdown’s width should be explicitly set to match the width of the field. Defaults to true.(是否应显式设置选取器下拉列表的宽度以匹配字段的宽度。默认为true。)
Defaults to: true

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值