react-base-table
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -5,2 +5,7 @@ # CHANGELOG | ||
# v1.1.1 (2019-04-27) | ||
- fix: `flattenOnKeys` memoize is opt out because `this._depthMap` changes everytime | ||
- fix: hover state is out of sync in frozen rows, regression introduced in #9 | ||
## v1.1.0 (2019-04-26) | ||
@@ -7,0 +12,0 @@ |
@@ -30,4 +30,3 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
import ColumnManager from './ColumnManager'; | ||
import { renderElement, normalizeColumns, isObjectEqual, callOrReturn, hasChildren, flattenOnKeys as _flattenOnKeys, cloneArray } from './utils'; | ||
var flattenOnKeys = memoize(_flattenOnKeys); | ||
import { renderElement, normalizeColumns, isObjectEqual, callOrReturn, hasChildren, flattenOnKeys, cloneArray } from './utils'; | ||
@@ -98,2 +97,6 @@ var getContainerStyle = function getContainerStyle(width, maxWidth, height) { | ||
_this._getRightTableContainerStyle = memoize(getContainerStyle); | ||
_this._flattenOnKeys = memoize(function (tree, keys, dataKey) { | ||
_this._depthMap = {}; | ||
return flattenOnKeys(tree, keys, _this._depthMap, 0, dataKey); | ||
}); | ||
_this._scroll = {}; | ||
@@ -724,4 +727,3 @@ _this._scrollHeight = 0; | ||
if (expandColumnKey) { | ||
this._depthMap = {}; | ||
this._data = flattenOnKeys(data, this.state.expandedRowKeys, this._depthMap, 0, this.props.rowKey); | ||
this._data = this._flattenOnKeys(data, this.state.expandedRowKeys, this.props.rowKey); | ||
} else { | ||
@@ -728,0 +730,0 @@ this._data = data; |
@@ -157,3 +157,4 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
headerRenderer: this.props.headerRenderer, | ||
rowRenderer: this.props.rowRenderer | ||
rowRenderer: this.props.rowRenderer, | ||
hoveredRowKey: frozenRowCount > 0 ? hoveredRowKey : null | ||
}))); | ||
@@ -160,0 +161,0 @@ }; |
@@ -76,4 +76,2 @@ "use strict"; | ||
var flattenOnKeys = (0, _memoizeOne.default)(_utils.flattenOnKeys); | ||
var getContainerStyle = function getContainerStyle(width, maxWidth, height) { | ||
@@ -145,2 +143,6 @@ return { | ||
_this._getRightTableContainerStyle = (0, _memoizeOne.default)(getContainerStyle); | ||
_this._flattenOnKeys = (0, _memoizeOne.default)(function (tree, keys, dataKey) { | ||
_this._depthMap = {}; | ||
return (0, _utils.flattenOnKeys)(tree, keys, _this._depthMap, 0, dataKey); | ||
}); | ||
_this._scroll = {}; | ||
@@ -789,4 +791,3 @@ _this._scrollHeight = 0; | ||
if (expandColumnKey) { | ||
this._depthMap = {}; | ||
this._data = flattenOnKeys(data, this.state.expandedRowKeys, this._depthMap, 0, this.props.rowKey); | ||
this._data = this._flattenOnKeys(data, this.state.expandedRowKeys, this.props.rowKey); | ||
} else { | ||
@@ -793,0 +794,0 @@ this._data = data; |
@@ -193,3 +193,4 @@ "use strict"; | ||
headerRenderer: this.props.headerRenderer, | ||
rowRenderer: this.props.rowRenderer | ||
rowRenderer: this.props.rowRenderer, | ||
hoveredRowKey: frozenRowCount > 0 ? hoveredRowKey : null | ||
}))); | ||
@@ -196,0 +197,0 @@ } |
{ | ||
"name": "react-base-table", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "a react table component to display large data set with high performance and flexibility", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
819641
5981