mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
29 lines
542 B
TypeScript
29 lines
542 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;
|