Skip to content
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(style): Virtual table style lead on none virtual table used as a nested table #47333

Merged
merged 6 commits into from
Feb 6, 2024
Merged
5 changes: 5 additions & 0 deletions components/table/__tests__/Table.virtual.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ describe('Table.Virtual', () => {
/>,
);

expect(
container.querySelectorAll(
'.ant-table-wrapper .ant-table-tbody-virtual .ant-table-row:not(tr)',
),
).toHaveLength(1);
expect(container.querySelectorAll('.rc-virtual-list-holder .ant-table-cell')).toHaveLength(1);
expect(container.querySelector('.rc-virtual-list-holder .ant-table-cell')?.textContent).toEqual(
'bamboo',
Expand Down
2 changes: 1 addition & 1 deletion components/table/style/virtual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const genVirtualStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
[`${componentCls}-wrapper`]: {
// ========================== Row ==========================
[`${componentCls}-tbody-virtual`]: {
[`${componentCls}-row`]: {
[`${componentCls}-row:not(tr)`]: {
display: 'flex',
boxSizing: 'border-box',
width: '100%',
Expand Down