mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 09:21:22 +08:00
29 lines
540 B
TypeScript
29 lines
540 B
TypeScript
|
import React from 'react';
|
||
|
import { Select } from 'antd';
|
||
|
import type { SelectProps } from 'antd';
|
||
|
|
||
|
const options: SelectProps['options'] = [];
|
||
|
|
||
|
for (let i = 10; i < 36; i++) {
|
||
|
options.push({
|
||
|
value: i.toString(36) + i,
|
||
|
label: i.toString(36) + i,
|
||
|
});
|
||
|
}
|
||
|
|
||
|
const handleChange = (value: string) => {
|
||
|
console.log(`selected ${value}`);
|
||
|
};
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<Select
|
||
|
mode="tags"
|
||
|
style={{ width: '100%' }}
|
||
|
onChange={handleChange}
|
||
|
tokenSeparators={[',']}
|
||
|
options={options}
|
||
|
/>
|
||
|
);
|
||
|
|
||
|
export default App;
|