Skip to content

Commit

Permalink
fix(style): Virtual table style lead on none virtual table used as a …
Browse files Browse the repository at this point in the history
…nested table (#47333)

* fix(style): Virtual table style lead on none virtual table render used as a nested table.

* fix(test): Update test for virtual table with fix nested table inside.

---------

Co-authored-by: ykryshtal <ykryshtal@magnite.com>
Co-authored-by: Eugene <Jeka1.1@mail.ru>
  • Loading branch information
3 people committed Feb 6, 2024
1 parent c3c9cfd commit 87882e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 87882e1

Please sign in to comment.