Skip to content

Commit

Permalink
docs: add mentions component filterOption default
Browse files Browse the repository at this point in the history
  • Loading branch information
shaodahong committed Oct 16, 2019
1 parent 3018dd9 commit 614b200
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/mentions/index.en-US.md
Expand Up @@ -26,7 +26,7 @@ When need to mention someone or something.
| --- | --- | --- | --- | --- |
| autoFocus | Auto get focus when component mounted | boolean | `false` | 3.19.0 |
| defaultValue | Default value | string | - | 3.19.0 |
| filterOption | Customize filter option logic | false \| (input: string, option: OptionProps) => boolean | - | 3.19.0 |
| filterOption | Customize filter option logic | false \| (input: string, option: OptionProps) => boolean | `(input, { value }) => value.toLowerCase().indexOf(input.toLowerCase()) !== -1` | 3.19.0 |
| notFoundContent | Set mentions content when not match | ReactNode | 'Not Found' | 3.19.0 |
| placement | Set popup placement | 'top' \| 'bottom' | 'bottom' | 3.19.0 |
| prefix | Set trigger prefix keyword | string \| string[] | '@' | 3.19.0 |
Expand Down
2 changes: 1 addition & 1 deletion components/mentions/index.tsx
Expand Up @@ -120,7 +120,7 @@ class Mentions extends React.Component<MentionProps, MentionState> {
};

getFilterOption = (): any => {
const { filterOption = false, loading } = this.props;
const { filterOption, loading } = this.props;
if (loading) {
return loadingFilterOption;
}
Expand Down
2 changes: 1 addition & 1 deletion components/mentions/index.zh-CN.md
Expand Up @@ -27,7 +27,7 @@ title: Mentions
| --- | --- | --- | --- | --- |
| autoFocus | 自动获得焦点 | boolean | `false` | 3.19.0 |
| defaultValue | 默认值 | string | - | 3.19.0 |
| filterOption | 自定义过滤逻辑 | false \| (input: string, option: OptionProps) => boolean | - | 3.19.0 |
| filterOption | 自定义过滤逻辑 | false \| (input: string, option: OptionProps) => boolean | `(input, { value }) => value.toLowerCase().indexOf(input.toLowerCase()) !== -1` | 3.19.0 |
| notFoundContent | 当下拉列表为空时显示的内容 | ReactNode | 'Not Found' | 3.19.0 |
| placement | 弹出层展示位置 | 'top' \| 'bottom' | 'bottom' | 3.19.0 |
| prefix | 设置触发关键字 | string \| string[] | '@' | 3.19.0 |
Expand Down

0 comments on commit 614b200

Please sign in to comment.