JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<link rel="stylesheet" href="http://www.blueprintcss.org/blueprint/screen.css">
<input id="cc" />
JavaScript
$(function(){
$('#cc').combogrid({
mode: 'remote',
//hasDownArrow: false,
width: 200,
panelWidth: 400,
fitColumns: true,
idField: 'geonameId',
textField: 'adminName1',
columns: [[
{field:'name',title:'Name',width:80},
{field:'adminName1',title:'adminName1',width:180},
{field:'countryName',title:'countryName',width:180}
]],
onBeforeLoad: function(param){
if (!param.q || param.q.length<2) return false;
},
loader: function(param,success,error){
$.ajax({
url: 'http://ws.geonames.org/searchJSON',
dataType: 'jsonp',
data: {
featureClass: 'P',
style: 'full',
maxRows: 12,
name_startsWith: param.q
},
success: function(data){
success(data.geonames);
},
error: function(){
error.apply(this, arguments);
}
});
}
});
});