fix: table expandable row header has no top left border radius (#39781)

* fix: expandable row table header is rendered as td and has no top left border radius #39769

* test: update expandIconColumnIndex
This commit is contained in:
Chuns Chen 2022-12-24 14:14:07 +08:00 committed by GitHub
parent 189f912a8a
commit 9d671ed939
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -105,10 +105,10 @@ describe('Table.expand', () => {
);
// header has td element (a11y): https://github.com/react-component/table/pull/859
const tdNodeList = container.querySelectorAll('td');
const tdNodeList = container.querySelectorAll('tbody td');
expect(tdNodeList[2].textContent).toEqual('bamboo');
expect(tdNodeList[3].querySelector('.ant-table-row-expand-icon')).toBeTruthy();
expect(tdNodeList[0].textContent).toEqual('bamboo');
expect(tdNodeList[1].querySelector('.ant-table-row-expand-icon')).toBeTruthy();
});
it('work with selection', () => {
@ -123,10 +123,10 @@ describe('Table.expand', () => {
rowSelection={{}}
/>,
);
const tdNodeList = container.querySelectorAll('td');
expect(tdNodeList[2].querySelector('.ant-checkbox-input')).toBeTruthy();
expect(tdNodeList[3].textContent).toEqual('bamboo');
expect(tdNodeList[4].querySelector('.ant-table-row-expand-icon')).toBeTruthy();
const tdNodeList = container.querySelectorAll('tbody td');
expect(tdNodeList[0].querySelector('.ant-checkbox-input')).toBeTruthy();
expect(tdNodeList[1].textContent).toEqual('bamboo');
expect(tdNodeList[2].querySelector('.ant-table-row-expand-icon')).toBeTruthy();
});
});
});

View File

@ -36,11 +36,11 @@ const genRadiusStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
borderStartEndRadius: tableRadius,
'table > thead > tr:first-child': {
'th:first-child': {
'> *:first-child': {
borderStartStartRadius: tableRadius,
},
'th:last-child': {
'> *:last-child': {
borderStartEndRadius: tableRadius,
},
},