Code:
Ext.application({ name : 'Fiddle',
launch : function() {
var states = Ext.create('Ext.data.Store', {
fields: ['stateId', 'name'],
data : [
{"stateId":"1", "name":"Alabama"},
{"stateId":"2", "name":"New Mexico"},
{"stateId":"3", "name":"California"},
{"stateId":"4", "name":"New York"}
]
});
Ext.create('Ext.form.field.Tag', {
fieldLabel: 'Choose',
store: states,
queryMode: 'local',
displayField: 'name',
valueField: 'stateId',
margin: '5 0 0 0',
multiSelect: true,
filterPickList: true,
forceSelection: false,
queryMode: 'local',
delimiter : null,
width: 300,
listeners: {
'select': function(combo, record) {
combo.inputEl.dom.value = '';
}
},
renderTo: Ext.getBody()
});
}
});