import React from 'react';
import ReactDOM from 'react-dom';
import Select from '..';
const Option = Select.Option;
const onChange = function (value) {
    console.log(value);
};
function generateItem(index) {
    return { label: `option${index}`, value: `option${index}` };
}
function generateOption(index) {
    return (React.createElement(Option, { key: `option${index}`, value: `option${index}` }, `option${index}`));
}
function generateData(len, isOption) {
    const data = [];
    for (let i = 0; i < len; i++) {
        isOption ? data.push(generateOption(i)) : data.push(generateItem(i));
    }
    return data;
}
ReactDOM.render(React.createElement("div", null,
    React.createElement(Select, { dataSource: generateData(100, true), useVirtual: true, onChange: onChange, defaultValue: "option0" }),
    React.createElement("br", null),
    React.createElement("br", null),
    React.createElement(Select, { useVirtual: true, onChange: onChange, defaultValue: "option50" }, generateData(100, true)),
    React.createElement("br", null),
    React.createElement("br", null),
    React.createElement(Select, { style: { width: 300 }, hasSelectAll: true, tagInline: true, mode: "multiple", dataSource: generateData(100, true), useVirtual: true, onChange: onChange, defaultValue: ['option0'] })), document.getElementById('select-demo-17'));
