JSFiddle - React, Tailwind, and code Playground

by olragon

HTML

<link rel="stylesheet" href="http://cdn.wijmo.com/themes/aristo/jquery-wijmo.css">
<link rel="stylesheet" href="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20131.4.min.css">
<script src="http://cdn.wijmo.com/jquery.wijmo-open.all.3.20131.4.min.js"></script>
<script src="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20131.4.min.js"></script>
<input id="combobox" />

JavaScript

/**
 * Returns a random integer between min and max
 * Using Math.round() will give you a non-uniform distribution!
 */
function getRandomInt (min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;
}

// prepare data
var superData = []
,   data = [
    { text: "Cotton", value: "1" },
    { text: "Polyester", value: "2" },
    { text: "Cotton/Polyester", value: "3" },
    { text: "Rib Knit", value: "4" }
];

for(var _i=0; _i<5000; _i++) {
    var randomEntry = data[getRandomInt(0,data.length-1)];
    randomEntry.text += '-' + _i;
    randomEntry.value += _i;
    superData.push(randomEntry);
}

$('#combobox').wijcombobox({
    data: superData,
    columns: [
        {name: "Text", width: 150},
        {name: "Value", width: 150}
    ]
});