From 3ef4b4346abb4c64603eb45d559ae13e1a3351d3 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Wed, 22 Feb 2017 10:05:57 +0800 Subject: [PATCH 1/2] fix: should not rely on z-index --- assets/index.less | 1 - src/Table.jsx | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/assets/index.less b/assets/index.less index 97aa4337f..6403c5410 100644 --- a/assets/index.less +++ b/assets/index.less @@ -169,7 +169,6 @@ position: absolute; top: 0; overflow: hidden; - z-index: 1; table { width: auto; background: #fff; diff --git a/src/Table.jsx b/src/Table.jsx index bead2255b..b4dfd86de 100644 --- a/src/Table.jsx +++ b/src/Table.jsx @@ -709,15 +709,15 @@ export default class Table extends React.Component {
(this.tableNode = node)} className={className} style={props.style}> {this.getTitle()}
- {this.columnManager.isAnyColumnsLeftFixed() && -
- {this.getLeftFixedTable()} -
}
{this.getTable({ columns: this.columnManager.groupedColumns() })} {this.getEmptyText()} {this.getFooter()}
+ {this.columnManager.isAnyColumnsLeftFixed() && +
+ {this.getLeftFixedTable()} +
} {this.columnManager.isAnyColumnsRightFixed() &&
{this.getRightFixedTable()} From 5fb55ac6becf70ae27d9cddae024503029e190ec Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Wed, 22 Feb 2017 17:57:09 +0800 Subject: [PATCH 2/2] test: update snapshot --- .../Table.fixedColumns.spec.js.snap | 292 +++++++++--------- 1 file changed, 146 insertions(+), 146 deletions(-) diff --git a/tests/__snapshots__/Table.fixedColumns.spec.js.snap b/tests/__snapshots__/Table.fixedColumns.spec.js.snap index a65d5641c..c7b6eb57d 100644 --- a/tests/__snapshots__/Table.fixedColumns.spec.js.snap +++ b/tests/__snapshots__/Table.fixedColumns.spec.js.snap @@ -3,152 +3,6 @@ exports[`Table.fixedColumns renders correctly 1`] = ` class="rc-table rc-table-scroll-position-left">
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- title1 - - title2 -
- - 123 - - xxxxxxxx -
- - cdd - - edd12221 -
- - 133 - -
- - 133 - -
- - 133 - -
- - 133 - -
- - 133 - -
- - 133 - -
- - 133 - -
-
-
-
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ title1 + + title2 +
+ + 123 + + xxxxxxxx +
+ + cdd + + edd12221 +
+ + 133 + +
+ + 133 + +
+ + 133 + +
+ + 133 + +
+ + 133 + +
+ + 133 + +
+ + 133 + +
+
+
+