Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var shows = Ext.create('Ext.data.Store', {
- fields: ['id','show'],
- data: [
- {id: 0, show: 'Battlestar Galactica'},
- {id: 1, show: 'Doctor Who'},
- {id: 2, show: 'Farscape'},
- {id: 3, show: 'Firefly'},
- {id: 4, show: 'Star Trek'},
- {id: 5, show: 'Star Wars: Christmas Special'}
- ]
- });
- Ext.create('Ext.form.Panel', {
- renderTo: Ext.getBody(),
- title: 'Sci-Fi Television',
- height: 200,
- width: 500,
- items: [{
- xtype: 'tagfield',
- fieldLabel: 'Select a Show',
- store: shows,
- displayField: 'show',
- valueField: 'id',
- queryMode: 'local',
- filterPickList: true,
- listeners: {
- change: {
- fn: function(){ console.log('Fiddle Change!')}
- },
- expand: {
- fn: function(){ console.log('Fiddle expand!')}
- },
- collapse: {
- fn: function(){ console.log('Fiddle collapse!')}
- }
- }
- }]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement