mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 21:48:19 +08:00
684 B
684 B
order | title | ||||
---|---|---|---|---|---|
3 |
|
zh-CN
不区分大小写的 AutoComplete
en-US
A non-case-sensitive AutoComplete
import { AutoComplete } from 'antd';
const options = [
{ value: 'Burns Bay Road' },
{ value: 'Downing Street' },
{ value: 'Wall Street' },
];
const Complete: React.FC = () => {
return (
<AutoComplete
style={{ width: 200 }}
options={options}
placeholder="try to type `b`"
filterOption={(inputValue, option) =>
option.value.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1
}
/>
);
}
ReactDOM.render(<Complete />, mountNode);