react-table-hoc-fixed-columns
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -249,3 +249,5 @@ "use strict"; | ||
value: function startUpdateHeaderEmptyColWidth() { | ||
if (this.hasFixedColumns) { | ||
var $offsetEl = document.querySelector('.rt-thead.-headerGroups .rt-tr .rt-th'); | ||
if (this.hasFixedColumns && $offsetEl) { | ||
var width = Array.from(document.querySelectorAll('.rt-thead.-header [data-fixedvisible="true"]')).map(function ($el) { | ||
@@ -256,3 +258,2 @@ return $el.offsetWidth; | ||
}, 0); | ||
var $offsetEl = document.querySelector('.rt-thead.-headerGroups .rt-tr .rt-th'); | ||
$offsetEl.style.width = "".concat(width, "px"); | ||
@@ -259,0 +260,0 @@ } |
{ | ||
"name": "react-table-hoc-fixed-columns", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "ReactTable HOC for fixed columns", | ||
@@ -10,3 +10,3 @@ "main": "lib/index.js", | ||
"docs": "webpack-dev-server", | ||
"docs:prod": "webpack -p" | ||
"docs:prod": "rm -rf docs && webpack -p" | ||
}, | ||
@@ -13,0 +13,0 @@ "keywords": [], |
@@ -7,4 +7,10 @@ | ||
[Demo here](https://guillaumejasmin.github.io/react-table-hoc-fixed-columns/) | ||
## Config | ||
```bash | ||
npm install react-table-hoc-fixed-columns --save | ||
``` | ||
It's really simple: add `fixed` property to your columns: | ||
@@ -11,0 +17,0 @@ |
19767
87