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(table): fix Table aria-label
contains [object Object]
#38389
Conversation
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #38389 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 446 446
Lines 8295 8304 +9
Branches 2520 2523 +3
=========================================
+ Hits 8295 8304 +9
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. |
title: ColumnTitle<RecordType>, | ||
props: ColumnTitleProps<RecordType>, | ||
) { | ||
const res = renderColumnTitle(title, props); |
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.
如果直接改 renderColumnTitle 会有啥影响不
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.
直接改容易出问题,目前其实就是aria-label
和title
当中需要纯字符串类型的值,其他场景一般都是可以是ReactNode
或其他合法的类型。
Co-authored-by: afc163 <afc163@gmail.com>
…sign#38389) * fix: columns title render not as expected * feat: code optimize * feat: update test case * feat: update test case * feat: code optimize * Update components/table/__tests__/Table.test.tsx Co-authored-by: afc163 <afc163@gmail.com> * feat: update aria-label * feat: update test case * feat: update snapshots * feat: update snapshots Co-authored-by: tangwenhui <tangwenhui@rd.netease.com> Co-authored-by: afc163 <afc163@gmail.com>
…sign#38389) * fix: columns title render not as expected * feat: code optimize * feat: update test case * feat: update test case * feat: code optimize * Update components/table/__tests__/Table.test.tsx Co-authored-by: afc163 <afc163@gmail.com> * feat: update aria-label * feat: update test case * feat: update snapshots * feat: update snapshots Co-authored-by: tangwenhui <tangwenhui@rd.netease.com> Co-authored-by: afc163 <afc163@gmail.com>
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
aria-label
is [object Object] #38155💡 Background and solution
aria-label should be use the first text content in element when column title is ReactElement in table
📝 Changelog
aria-label
contains[object Object]
.aria-label
出现[object Object]
的问题。☑️ Self-Check before Merge