Permalink
Browse files

fix(table): fixed issue when td is used within thead instead of th

  • Loading branch information...
lara-aigmueller committed Feb 1, 2017
1 parent caf2404 commit 51fc76a4dbe481dcfee35d90cd0075b30e9ff019
Showing with 14 additions and 5 deletions.
  1. +4 −1 src/table/table.js
  2. +10 −4 src/table/table.scss
View
@@ -1,7 +1,10 @@
import $ from '../js-common-components/dollar';
const fillData = (table) => {
const th = $('th', table);
let th = $('th', table);
if (!th.length) {
th = $('thead td', table);
}
const header = th.map(el => el.textContent);
const tr = $('tr', table);
tr.forEach(row => {
View
@@ -74,15 +74,19 @@ $breakpoint: 920px;
}
}
.table thead th {
.table thead th,
.table thead td {
text-align: left;
font-weight: normal;
font-size: 12px;
position: relative;
overflow: hidden;
padding-top: 0;
padding-bottom: 0;
}
.table thead th:after {
.table thead th:after,
.table thead td:after {
content: " ";
height: 1px;
position: absolute;
@@ -92,7 +96,8 @@ $breakpoint: 920px;
background-color: $gray-200;
}
.table thead th:before {
.table thead th:before,
.table thead td:before {
content: " ";
height: 1px;
position: absolute;
@@ -103,7 +108,8 @@ $breakpoint: 920px;
z-index: 2;
}
.table thead th:last-child:before {
.table thead th:last-child:before,
.table thead td:last-child:before {
display: none;
}

0 comments on commit 51fc76a

Please sign in to comment.