mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
55e0d13234
* chore: Add demo tsx check * chore: Prettier * chore: Fix lint * fix: Upload ts definition * chore: Demo onlt * docs: Fix demo * chore: Add CI action * chore: Use real name * chore: fix ts define * chore: fix more ts * chore: fix more ts * chore: More ts * chore: More ts * chore: More ts * chore: More ts * chore: More ts * chore: More ts * chore: More ts * chore: Update all rest TS demo * fix test case
38 lines
654 B
Markdown
38 lines
654 B
Markdown
---
|
|
order: 3
|
|
title:
|
|
zh-CN: 不区分大小写
|
|
en-US: Non-case-sensitive AutoComplete
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
不区分大小写的 AutoComplete
|
|
|
|
## en-US
|
|
|
|
A non-case-sensitive AutoComplete
|
|
|
|
```tsx
|
|
import { AutoComplete } from 'antd';
|
|
|
|
const options = [
|
|
{ value: 'Burns Bay Road' },
|
|
{ value: 'Downing Street' },
|
|
{ value: 'Wall Street' },
|
|
];
|
|
|
|
const Complete: React.FC = () => (
|
|
<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);
|
|
```
|