fix(style): Virtual table style lead on none virtual table used as a 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>
This commit is contained in:
Eugene 2024-02-06 05:30:17 +02:00 committed by GitHub
parent c3c9cfd652
commit 87882e1db6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -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',

View File

@ -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%',