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

你可能感兴趣的:(Extjs)