-
-
Notifications
You must be signed in to change notification settings - Fork 53.4k
feat: ConfigProvider support classNames and styles for table #53659
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
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
👁 Visual Regression Report for PR #53659 Failed ❌
Warning There are more diffs not shown in the table. Please check the Full Report for details. Important There are 15 diffs found in this PR: 🔄
|
WalkthroughThis pull request introduces a new feature to the ConfigProvider, allowing support for Changes
🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
size-limit report 📦
|
Deploying ant-design with
|
Latest commit: |
6ec7a2d
|
Status: | ✅ Deploy successful! |
Preview URL: | https://1930d835.ant-design.pages.dev |
Branch Preview URL: | https://cp-table.ant-design.pages.dev |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #53659 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 788 788
Lines 14305 14307 +2
Branches 3784 3784
=========================================
+ Hits 14305 14307 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0771410
to
90e3f6a
Compare
ecd0b75
to
ac05a5e
Compare
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 7.76MB (207.01%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
|
||
const locales = { | ||
cn: { | ||
root: '根元素', |
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.
'body.cell': '主体单元格元素', | ||
footer: '底部元素', | ||
content: '内容元素', | ||
'pagination.root': '分页根元素', |
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.
pagination 好评~~
components/table/InternalTable.tsx
Outdated
@@ -75,6 +77,8 @@ interface ChangeEventInfo<RecordType = AnyObject> { | |||
resetPagination: (current?: number, pageSize?: number) => void; | |||
} | |||
|
|||
export type SemanticName = 'root' | 'section' | 'title' | 'footer' | 'content'; |
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.
这部分可以从 rc-table 里来出来,下面的 ComponentsSemantic 也是一样的~不用重复定义:
type ClassNames = RcTableProps['classNames'] & {
pagination?: ...
};
_default: 'root', | ||
}, | ||
header: { | ||
_default: 'wrapper', |
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.
到 wrapper上?优雅~
address: 'Sydney No. 1 Lake Park', | ||
}, | ||
]; | ||
const testClassNames = { |
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.
Table 比较复杂,还要做一个数量对比,每个 classNames 都要数量正确。
const [locale] = useLocale(locales); | ||
|
||
return ( | ||
<> |
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.
这个 Fragment 是多余的
🤔 This is a ...
💡 Background and Solution
wait for react-component/table#1261
📝 Change Log