JSFiddle - React, Tailwind, and code Playground

by kien16

HTML

<link rel="stylesheet" href="http://cdn.sencha.io/ext-4.1.1-gpl/resources/css/ext-all.css">

JavaScript

Ext.onReady(function(){
    var window = Ext.create('Ext.window.Window', {
        title: 'My window example',
        height: 200,
        width: 400,
        items: {
            xtype: 'form',
            items: {
                xtype: 'combo',
                id: 'combo',
                queryMode: 'local',                
                displayField: 'name',
                valueField: 'id',
                store: Ext.create('Ext.data.Store', {
                    fields: ['id', 'name'],
                    data: [
                      {'id': '1', 'name': 'John Smith'},
                      {'id': '2', 'name': 'Albert Einstein'}
                    ]
                }),
                listeners: {
                    change: function( combo, newValue, oldValue, eOpts ) {
                        alert('reset fire 1');
                    },
                    dirtychange:function( combo, isDirty, eOpts ) {
                        alert('reset fire 2');
                    },
                   select: function( combo, records, eOpts ) {
                        alert('reset fire 3');
                   }
                }
            }
        }
    }).show();
    
    Ext.create('Ext.Button', {
	    text: 'Reset',
	    visible: false,
	    renderTo: Ext.getBody(),
	    handler: function() {
	        window.down('form').getForm().reset();
	    }
	});
});