react-base-table
Advanced tools
Comparing version 1.10.5 to 1.10.6
@@ -5,2 +5,6 @@ # CHANGELOG | ||
## v1.10.6 (2020-07-25) | ||
- fix: `getTotalRowsHeight` could be different before/after render in dynamic mode | ||
## v1.10.5 (2020-07-10) | ||
@@ -7,0 +11,0 @@ |
@@ -843,2 +843,4 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
this._totalRowsHeight = this.getTotalRowsHeight(); | ||
var containerStyle = _objectSpread({}, style, { | ||
@@ -869,6 +871,9 @@ width: width, | ||
_proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { | ||
var _this2 = this; | ||
var _this$props13 = this.props, | ||
data = _this$props13.data, | ||
height = _this$props13.height, | ||
maxHeight = _this$props13.maxHeight; | ||
maxHeight = _this$props13.maxHeight, | ||
estimatedRowHeight = _this$props13.estimatedRowHeight; | ||
@@ -885,2 +890,13 @@ if (data !== prevProps.data) { | ||
this._maybeScrollbarPresenceChange(); | ||
if (estimatedRowHeight) { | ||
// we have to wrap with setTimeout or we would still get the previous value, | ||
// as we reset the inner components directly instead of update the table itself after row heights measured, | ||
// so `componentDidUpdate` won't be invoked after that | ||
setTimeout(function () { | ||
if (_this2.getTotalRowsHeight() !== _this2._totalRowsHeight) { | ||
_this2.forceUpdate(); | ||
} | ||
}); | ||
} | ||
}; | ||
@@ -887,0 +903,0 @@ |
@@ -895,2 +895,4 @@ "use strict"; | ||
this._totalRowsHeight = this.getTotalRowsHeight(); | ||
var containerStyle = _objectSpread({}, style, { | ||
@@ -923,6 +925,9 @@ width: width, | ||
value: function componentDidUpdate(prevProps, prevState) { | ||
var _this2 = this; | ||
var _this$props13 = this.props, | ||
data = _this$props13.data, | ||
height = _this$props13.height, | ||
maxHeight = _this$props13.maxHeight; | ||
maxHeight = _this$props13.maxHeight, | ||
estimatedRowHeight = _this$props13.estimatedRowHeight; | ||
@@ -939,2 +944,13 @@ if (data !== prevProps.data) { | ||
this._maybeScrollbarPresenceChange(); | ||
if (estimatedRowHeight) { | ||
// we have to wrap with setTimeout or we would still get the previous value, | ||
// as we reset the inner components directly instead of update the table itself after row heights measured, | ||
// so `componentDidUpdate` won't be invoked after that | ||
setTimeout(function () { | ||
if (_this2.getTotalRowsHeight() !== _this2._totalRowsHeight) { | ||
_this2.forceUpdate(); | ||
} | ||
}); | ||
} | ||
} | ||
@@ -941,0 +957,0 @@ }, { |
{ | ||
"name": "react-base-table", | ||
"version": "1.10.5", | ||
"version": "1.10.6", | ||
"description": "a react table component to display large data set with high performance and flexibility", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -122,4 +122,8 @@ # react-base-table | ||
## Development | ||
We use `Yarn` as the package manager, checkout this repo and run `yarn` under both root folder and `website` folder in install packages, then run `yarn start` to start the demo site powered by `Gatsby` | ||
## Contributing | ||
Please check [guidelines](CONTRIBUTING.md) for more details |
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
899164
6835
129