mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-25 16:58:00 +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;
|