Skip to content

Commit e54ca93

Browse files
authored
fix: table header scroll style issue (#772)
close ant-design/ant-design#34775
1 parent 8e386c3 commit e54ca93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Table.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,10 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
486486

487487
if (currentTarget) {
488488
const { scrollWidth, clientWidth } = currentTarget;
489+
// There is no space to scroll
490+
if (scrollWidth === clientWidth) {
491+
return;
492+
}
489493
if (isRTL) {
490494
setPingedLeft(-mergedScrollLeft < scrollWidth - clientWidth);
491495
setPingedRight(-mergedScrollLeft > 0);

0 commit comments

Comments
 (0)