-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
base: master
Are you sure you want to change the base?
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
经过试验在 Ant Design 调整 prefix 的布局十分困难,因此需要在 SingleSelector 增加一个 wrapper 元素,来限制布局。