JSFiddle - React, Tailwind, and code Playground
by kien16
HTML
<link rel="stylesheet" href="http://docs.sencha.com/ext-js/4-0/extjs-build/resources/css/ext-all.css">
JavaScript
Ext.onReady(function() {
var values = new Ext.data.Store({
reader: new Ext.data.JsonReader({
fields: ['id', 'name'],
root: 'rows'
}),
proxy: new Ext.data.HttpProxy({
url: 'data.php'
}),
autoLoad: true
});
new Ext.FormPanel({
renderTo: Ext.getBody(),
frame: true,
title: 'Title',
width: 550,
items: [
{
xtype: 'combo',
name: 'value',
fieldLabel: 'Value',
value: '1',
triggerAction: 'all',
forceSelection: true,
editable: false,
allowBlank: false,
mode: 'remote',
store: values,
displayField:'name',
valueField: 'id',
width: 230
}
]
});
});