mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-13 07:39:10 +08:00
43 lines
790 B
TypeScript
43 lines
790 B
TypeScript
import React from 'react';
|
|
import { Select } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<Select
|
|
showSearch
|
|
style={{ width: 200 }}
|
|
placeholder="Search to Select"
|
|
optionFilterProp="label"
|
|
filterSort={(optionA, optionB) =>
|
|
(optionA?.label ?? '').toLowerCase().localeCompare((optionB?.label ?? '').toLowerCase())
|
|
}
|
|
options={[
|
|
{
|
|
value: '1',
|
|
label: 'Not Identified',
|
|
},
|
|
{
|
|
value: '2',
|
|
label: 'Closed',
|
|
},
|
|
{
|
|
value: '3',
|
|
label: 'Communicated',
|
|
},
|
|
{
|
|
value: '4',
|
|
label: 'Identified',
|
|
},
|
|
{
|
|
value: '5',
|
|
label: 'Resolved',
|
|
},
|
|
{
|
|
value: '6',
|
|
label: 'Cancelled',
|
|
},
|
|
]}
|
|
/>
|
|
);
|
|
|
|
export default App;
|