Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/FixedHolder/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ const FixedHolder = React.forwardRef<HTMLDivElement, FixedHeaderProps<any>>((pro
<TableComponent
style={{
tableLayout,
visibility: noData || mergedColumnWidth ? null : 'hidden',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

表头闪烁的问题已经修掉了,因此 #507 这里的改动不需要了,表头不需要先隐藏。

minWidth: '100%',
// https://github.com/ant-design/ant-design/issues/54894
width: scrollX,
Expand Down
31 changes: 0 additions & 31 deletions tests/FixedHeader.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,37 +108,6 @@ describe('Table.FixedHeader', () => {
);
});

it('show header when data is null', async () => {
const columns = [
{
title: 'Name',
dataIndex: 'name',
key: 'name',
},
{
title: 'Age',
dataIndex: 'age',
key: 'age',
},
];

const wrapper = mount(
<Table
columns={columns}
data={[]}
scroll={{
x: true,
y: 100,
}}
/>,
);

await safeAct(wrapper);
expect(wrapper.find('.rc-table-header table').props().style).toEqual(
expect.objectContaining({ visibility: null }),
);
});

it('rtl', async () => {
const wrapper = mount(
<Table
Expand Down