From 6527f9cdb0a438651bf6c8694ef897c637ada3ef Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 27 Aug 2017 17:24:00 +0800 Subject: [PATCH] More elegant empty style for fixed-columns Table close #7298 close #7142 --- components/table/style/index.less | 19 +++++++++++++------ package.json | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/components/table/style/index.less b/components/table/style/index.less index b33e76837b..44e1494075 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -69,6 +69,11 @@ &-tbody > tr > td { border-bottom: @border-width-base @border-style-base @border-color-split; transition: all .3s; + // height placeholder for empty cell + &:empty:after { + content: '.'; + visibility: hidden; + } } &-thead > tr, @@ -438,6 +443,14 @@ .@{iconfont-css-prefix} { margin-right: 4px; } + + &-fixed-columns { + position: absolute; + bottom: 0; + width: 100%; + background: transparent; + pointer-events: none; + } } &-pagination { @@ -625,12 +638,6 @@ margin-bottom: -20px; } - // Ignore the scroll.x width - // https://github.com/ant-design/ant-design/issues/7142 - &-empty &-scroll &-body &-fixed { - width: auto !important; - } - &-fixed-left, &-fixed-right { position: absolute; diff --git a/package.json b/package.json index 1214e4bccf..e7051286b8 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "rc-slider": "~8.2.0", "rc-steps": "~2.5.1", "rc-switch": "~1.5.1", - "rc-table": "~5.4.0", + "rc-table": "~5.6.1", "rc-tabs": "~9.1.2", "rc-time-picker": "~2.4.1", "rc-tooltip": "~3.4.6",