You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
540 B
28 lines
540 B
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;
|
|
|