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: table expandable row header has no top left border radius #39781

Merged
merged 2 commits into from Dec 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions components/table/__tests__/Table.expand.test.tsx
Expand Up @@ -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', () => {
Expand All @@ -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();
});
});
});
4 changes: 2 additions & 2 deletions components/table/style/radius.tsx
Expand Up @@ -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,
},
},
Expand Down