Skip to content

Commit dd4a870

Browse files
shaodahongzombieJ
authored andcommitted
fix: display scrollBar (#410)
* fix: dispaly scrollBar * update snapshots
1 parent 2239729 commit dd4a870

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

assets/index.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@tablePrefixCls: rc-table;
2-
@text-color : #666;
3-
@font-size-base : 12px;
2+
@text-color: #666;
3+
@font-size-base: 12px;
44
@line-height: 1.5;
55
@table-border-color: #e9e9e9;
66
@table-head-background-color: #f7f7f7;

src/Table.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,7 @@ function Table<RecordType extends DefaultRecordType>(props: TableProps<RecordTyp
532532
{showHeader !== false && (
533533
<div
534534
style={{
535-
...scrollXStyle,
536-
marginBottom: fixColumn ? -scrollbarSize : null,
535+
overflow: 'hidden',
537536
}}
538537
onScroll={onScroll}
539538
ref={scrollHeaderRef}

tests/__snapshots__/FixedColumn.spec.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ exports[`Table.FixedColumn renders correctly scrollXY - with data 1`] = `
796796
>
797797
<div
798798
class="rc-table-header"
799-
style="overflow-x: scroll; margin-bottom: -15px;"
799+
style="overflow: hidden;"
800800
>
801801
<table
802802
style="table-layout: fixed;"

tests/__snapshots__/Table.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ exports[`Table.Basic custom components renders fixed column and header correctly
7575
>
7676
<div
7777
class="rc-table-header"
78-
style="overflow-x: scroll; margin-bottom: -15px;"
78+
style="overflow: hidden;"
7979
>
8080
<table
8181
style="table-layout: fixed; visibility: hidden;"
@@ -196,7 +196,7 @@ exports[`Table.Basic custom components scroll content with scroll 1`] = `
196196
>
197197
<div
198198
class="rc-table-header"
199-
style="overflow-x: scroll; margin-bottom: -15px;"
199+
style="overflow: hidden;"
200200
>
201201
<table
202202
style="table-layout: fixed;"

0 commit comments

Comments
 (0)