-
Notifications
You must be signed in to change notification settings - Fork 199
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: 修复表头存在自定义 icon 时, 文本换行高度自适应不准确 #3065
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
你好 @lijinke666,非常感谢你的贡献. Hello, @lijinke666, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes. |
Walkthrough此PR修复了在表头存在自定义图标时,文本换行高度自适应不准确的问题。通过在预渲染阶段生成图标配置,确保文本的最大宽度计算正确,避免了高度测量不准确的问题。 Changes
|
@@ -112,7 +112,7 @@ export abstract class HeaderCell< | |||
this.generateIconConfig(); | |||
} | |||
|
|||
protected generateIconConfig() { | |||
public generateIconConfig() { |
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.
Changing the access level of generateIconConfig
from protected
to public
may expose this method to unintended usage. Ensure that this change is necessary and does not introduce any security or functional issues.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #3065 +/- ##
==========================================
Coverage 75.77% 75.77%
==========================================
Files 257 51 -206
Lines 11994 1490 -10504
Branches 2464 284 -2180
==========================================
- Hits 9088 1129 -7959
+ Misses 1398 210 -1188
+ Partials 1508 151 -1357 ☔ View full report in Codecov by Sentry. |
Size Change: +31 B (+0.01%) Total Size: 619 kB
ℹ️ View Unchanged
|
🎉 This PR is included in version @antv/s2-v2.1.8 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @antv/s2-react-v2.1.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
👀 PR includes
🐛 Bugfix
📝 Description
预渲染文本时, 由于此时还没有生成 icon 配置, 所以文本最大宽度就是
cell - padding
, 实际渲染时是cell - padding - icon
, 所以两者不一致, 导致测量自适应的高度必实际小🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge