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
Mentions data driven #38630
Mentions data driven #38630
Conversation
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## feature #38630 +/- ##
===========================================
Coverage 100.00% 100.00%
===========================================
Files 447 544 +97
Lines 8314 9365 +1051
Branches 2531 2652 +121
===========================================
+ Hits 8314 9365 +1051
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
components/mentions/index.tsx
Outdated
@@ -28,7 +28,7 @@ export interface OptionProps { | |||
} | |||
|
|||
export interface DataDrivenOptionProps { | |||
label?: React.ReactNode; | |||
label?: string | React.ReactNode; |
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.
ReactNode 里面有 string,这里不需要改。
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.
get
cb24003
to
1ccfa74
Compare
…t-design into Mentions-dataDriven
components/mentions/index.en-US.md
Outdated
@@ -56,6 +68,7 @@ When you need to mention someone or something. | |||
| onResize | The callback function that is triggered when textarea resize | function({ width, height }) | - | | | |||
| onSearch | Trigger when prefix hit | (text: string, prefix: string) => void | - | | | |||
| onSelect | Trigger when user select the option | (option: OptionProps, prefix: string) => void | - | | | |||
| options | Option Configuration | \[Options](#Option) | \[] | 4.25.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.
这个应该是 v5 的了
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.
done
components/mentions/index.tsx
Outdated
return children; | ||
}; | ||
if (loading) { | ||
options = [ |
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.
不要直接覆盖提供的参数,额外写一个 mergedOptions 来处理~
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.
done
components/mentions/index.en-US.md
Outdated
@@ -56,6 +68,7 @@ When you need to mention someone or something. | |||
| onResize | The callback function that is triggered when textarea resize | function({ width, height }) | - | | | |||
| onSearch | Trigger when prefix hit | (text: string, prefix: string) => void | - | | | |||
| onSelect | Trigger when user select the option | (option: OptionProps, prefix: string) => void | - | | | |||
| options | Option Configuration | \[Options](#Option) | \[] | 5.1.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.
| options | Option Configuration | \[Options](#Option) | \[] | 5.1.0 | | |
| options | Option Configuration | [Options](#Option) | \[] | 5.1.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.
done
|
||
// =================== Warning ===================== | ||
if (process.env.NODE_ENV !== 'production') { | ||
warning( |
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.
这个好像没写测试
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.
done
* feat: reset and force update * feat: update package * feat: reset * feat: update for viewer * feat: update for viewer * feat: update for viewer * feat: update for viewer * feat: update for viewer * update doc * feat: add waring * feat: update doc * feat: add test case
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge