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
docs: add mentions component filterOption default #19241
Conversation
Deploy preview for ant-design ready! Built with commit 614b200 |
Codecov Report
@@ Coverage Diff @@
## master #19241 +/- ##
=======================================
Coverage 97.78% 97.78%
=======================================
Files 282 282
Lines 7625 7625
Branches 2132 2132
=======================================
Hits 7456 7456
Misses 169 169
Continue to review full report at Codecov.
|
默认需要触发 filter |
加个默认值吧 |
👌,代码那边是没动只是 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 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个太长了,也不是用户关心的。改成 Case Insensitive 吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不区分大小写感觉令人困惑,解释不了中文和拼音之间的联动性,至少实际项目中异步返回数据来说并不是字符的 indexOf
,就和 GitHub
的 #
一样
🤔 This is a ...
🔗 Related issue link
Fixed #19235
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge