-
-
Notifications
You must be signed in to change notification settings - Fork 457
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
fix: add root element for SingleSelector to make layout easier #1076
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1076 +/- ##
=======================================
Coverage 98.23% 98.24%
=======================================
Files 39 39
Lines 1474 1482 +8
Branches 439 446 +7
=======================================
+ Hits 1448 1456 +8
Misses 26 26 ☔ View full report in Codecov by Sentry. |
046105b
to
4b55511
Compare
@@ -77,7 +77,7 @@ const SingleSelector: React.FC<SelectorProps> = (props) => { | |||
}, [item, hasTextInput, placeholder, prefixCls]); | |||
|
|||
return ( | |||
<> | |||
<span className={`${prefixCls}-selection-wrap`}> |
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.
<span className={`${prefixCls}-selection-wrap`}> | |
<span className={`${prefixCls}-selection`}> |
不需要加 wrap
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.
placeholder 特殊标记使用:classNames(xx-selection, xxx-selection-placeholder)
看起来是额外多一层?结构保持一致把,Single 和 Multiple 要加就一起加了:
https://github.com/react-component/select/blob/master/src/Selector/SingleSelector.tsx#L80
https://github.com/react-component/select/blob/master/src/Selector/MultipleSelector.tsx#L245
4b55511
to
add12a0
Compare
Walkthrough此次变更涉及对与 Changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🧰 Additional context used🔇 Additional comments (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
经过试验在 Ant Design 调整 prefix 的布局十分困难,因此需要在 SingleSelector 增加一个 wrapper 元素,来限制布局。
Summary by CodeRabbit
新功能
样式更新