forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: AutoComplete document and demo improvement (ant-design#4840)
* AutoComplete document and demo improvement + add a non-case-sensitive demo, close ant-design#4834. + remove confusing descriptions from document, close ant-design#4805. * add snapshot
- Loading branch information
Showing
5 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
order: 3 | ||
title: | ||
zh-CN: 不区分大小写 | ||
en-US: Non-case-sensitive AutoComplete | ||
--- | ||
|
||
## zh-CN | ||
|
||
不区分大小写的 AutoComplete | ||
|
||
## en-US | ||
|
||
A non-case-sensitive AutoComplete | ||
|
||
````jsx | ||
import { AutoComplete } from 'antd'; | ||
|
||
const dataSource = ['Burns Bay Road', 'Downing Street', 'Wall Street']; | ||
|
||
function Complete() { | ||
return (<AutoComplete | ||
style={{ width: 200 }} | ||
dataSource={dataSource} | ||
placeholder="try to type `b`" | ||
filterOption={(inputValue, option) => option.props.children.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1} | ||
/>); | ||
} | ||
|
||
ReactDOM.render(<Complete />, mountNode); | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
order: 3 | ||
order: 4 | ||
title: | ||
zh-CN: 查询模式 - 不确定类目 | ||
en-US: Lookup-Patterns - Uncertain Category | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters