mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
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:
parent
189f912a8a
commit
9d671ed939
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -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,
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user