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.
22 lines
458 B
22 lines
458 B
2 years ago
|
import React from 'react';
|
||
|
import { AutoComplete } from 'antd';
|
||
|
|
||
|
const options = [
|
||
|
{ value: 'Burns Bay Road' },
|
||
|
{ value: 'Downing Street' },
|
||
|
{ value: 'Wall Street' },
|
||
|
];
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<AutoComplete
|
||
|
style={{ width: 200 }}
|
||
|
options={options}
|
||
|
placeholder="try to type `b`"
|
||
|
filterOption={(inputValue, option) =>
|
||
|
option!.value.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1
|
||
|
}
|
||
|
/>
|
||
|
);
|
||
|
|
||
|
export default App;
|