@teselagen/react-table 6.10.13 → 6.10.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +0 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/react-table",
3
- "version": "6.10.13",
3
+ "version": "6.10.15",
4
4
  "description": "teselagen maintained version of react-table@v6 (with react-list virtualization enabled by default above 200 rows) -- A fast, lightweight, opinionated table and datagrid built on React",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/tnrich/react-table#readme",
package/src/index.js CHANGED
@@ -34,27 +34,6 @@ export default class ReactTable extends Methods(Lifecycle(Component)) {
34
34
  this.resizeColumnEnd = this.resizeColumnEnd.bind(this)
35
35
  this.resizeColumnMoving = this.resizeColumnMoving.bind(this)
36
36
 
37
- setTimeout(() => {
38
- // tnw: this is some very hacky code to set the initial column widths
39
- try {
40
- const newResized = this.props.defaultResized || []
41
- this.tableRef.querySelectorAll('.tg-react-table-column-header').forEach(th => {
42
- const { width } = th.parentNode.parentNode.getBoundingClientRect()
43
- const id = th.getAttribute('data-path')
44
- if (!newResized.find(x => x.id === id)) {
45
- newResized.push({
46
- id,
47
- value: width,
48
- })
49
- }
50
- })
51
- this.setState({
52
- resized: newResized,
53
- })
54
- } catch (e) {
55
- console.warn('TNW: Error setting initial table column widths (please contact @tnrich if you see this error. thanks!):', e)
56
- }
57
- }, 0)
58
37
 
59
38
  this.state = {
60
39
  page: props.defaultPage,