Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add mentions component filterOption default #19241

Closed
wants to merge 2 commits into from
Closed

docs: add mentions component filterOption default #19241

wants to merge 2 commits into from

Conversation

shaodahong
Copy link
Member

@shaodahong shaodahong commented Oct 16, 2019

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

Fixed #19235

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Doc add mentions component filterOption default
🇨🇳 Chinese 文档添加 mentions 组件 filterOption 属性的默认值

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for ant-design ready!

Built with commit 614b200

https://deploy-preview-19241--ant-design.netlify.com

@shaodahong shaodahong changed the title fix: mentions trigger default filterOption fix: mentions component trigger default filterOption Oct 16, 2019
@codecov
Copy link

codecov bot commented Oct 16, 2019

Codecov Report

Merging #19241 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #19241   +/-   ##
=======================================
  Coverage   97.78%   97.78%           
=======================================
  Files         282      282           
  Lines        7625     7625           
  Branches     2132     2132           
=======================================
  Hits         7456     7456           
  Misses        169      169
Impacted Files Coverage Δ
components/mentions/index.tsx 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab34970...614b200. Read the comment docs.

@zombieJ
Copy link
Member

zombieJ commented Oct 16, 2019

默认需要触发 filter
ref #19235 (comment)

@zombieJ zombieJ closed this Oct 16, 2019
@shaodahong
Copy link
Member Author

加个默认值吧

@shaodahong shaodahong reopened this Oct 16, 2019
@shaodahong shaodahong changed the title fix: mentions component trigger default filterOption docs: add mentions component filterOption default Oct 16, 2019
@buildsize
Copy link

buildsize bot commented Oct 16, 2019

File name Previous Size New Size Change
package-lock.json 914.05 KB 910.89 KB -3.16 KB (0%)

@zombieJ
Copy link
Member

zombieJ commented Oct 16, 2019

👌,代码那边是没动只是 prettier 对吧?

@@ -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 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个太长了,也不是用户关心的。改成 Case Insensitive 吧

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不区分大小写感觉令人困惑,解释不了中文和拼音之间的联动性,至少实际项目中异步返回数据来说并不是字符的 indexOf,就和 GitHub# 一样

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mentions异步加载输入中文问题
2 participants