mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-13 23:59:12 +08:00
44 lines
869 B
TypeScript
44 lines
869 B
TypeScript
|
import React from 'react';
|
||
|
import { Select } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<Select
|
||
|
showSearch
|
||
|
style={{ width: 200 }}
|
||
|
placeholder="Search to Select"
|
||
|
optionFilterProp="children"
|
||
|
filterOption={(input, option) => (option?.label ?? '').includes(input)}
|
||
|
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;
|