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: Select align style broken with custom height #44753
Conversation
Run & review this pull request in StackBlitz Codeflow. |
e1e6636
to
4dd684d
Compare
size-limit report 📦
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #44753 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 680 680
Lines 11417 11417
Branches 3073 3073
=========================================
Hits 11417 11417
☔ View full report in Codecov by Sentry. |
@@ -92,7 +89,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject { | |||
[`&:not(${componentCls}-customize-input)`]: { | |||
[`${componentCls}-selector`]: { | |||
width: '100%', | |||
height: token.controlHeight, |
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.
高度改到外层了,这样可以被 style.height 覆盖。
@@ -48,11 +48,12 @@ const App: React.FC = () => { | |||
|
|||
return ( | |||
<AutoComplete | |||
dropdownMatchSelectWidth={252} | |||
popupMatchSelectWidth={252} |
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.
顺手改掉。
@@ -15,6 +15,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject { | |||
return { | |||
[`${componentCls}-single${suffixCls}`]: { | |||
fontSize: token.fontSize, | |||
height: token.controlHeight, |
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.
改到外层了,这样可以被 style.height 覆盖。
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
close #44672
💡 Background and solution
这样便能重现。
修复后效果是:
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at e1e6636
Improved the select component's demo and styles. Added more examples of option label centering to the demo using the
Cascader
component. Fixed some style issues in themultiple.tsx
andsingle.tsx
files to enhance the layout and alignment of the select component.🔍 Walkthrough
🤖 Generated by Copilot at e1e6636