react-base-table
Advanced tools
Comparing version 1.8.1 to 1.9.0
@@ -5,2 +5,6 @@ # CHANGELOG | ||
## v1.9.0 (2019-09-24) | ||
- feat: add `onColumnResizeEnd` prop to `BaseTable` | ||
## v1.8.1 (2019-09-23) | ||
@@ -7,0 +11,0 @@ |
@@ -1031,5 +1031,15 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
_proto._handleColumnResizeStop = function _handleColumnResizeStop() { | ||
var _this$state = this.state, | ||
resizingKey = _this$state.resizingKey, | ||
resizingWidth = _this$state.resizingWidth; | ||
this.setState({ | ||
resizingKey: null | ||
resizingKey: null, | ||
resizingWidth: 0 | ||
}); | ||
if (!resizingKey || !resizingWidth) return; | ||
var column = this.columnManager.getColumn(resizingKey); | ||
this.props.onColumnResizeEnd({ | ||
column: column, | ||
width: resizingWidth | ||
}); | ||
}; | ||
@@ -1085,3 +1095,4 @@ | ||
onColumnSort: noop, | ||
onColumnResize: noop | ||
onColumnResize: noop, | ||
onColumnResizeEnd: noop | ||
}; | ||
@@ -1307,2 +1318,8 @@ BaseTable.propTypes = { | ||
/** | ||
* A callback function when resizing the column width ends | ||
* The handler is of the shape of `({ column, width }) => *` | ||
*/ | ||
onColumnResizeEnd: PropTypes.func, | ||
/** | ||
* Adds an additional isScrolling parameter to the row renderer. | ||
@@ -1309,0 +1326,0 @@ * This parameter can be used to show a placeholder row while scrolling. |
@@ -1111,5 +1111,15 @@ "use strict"; | ||
value: function _handleColumnResizeStop() { | ||
var _this$state = this.state, | ||
resizingKey = _this$state.resizingKey, | ||
resizingWidth = _this$state.resizingWidth; | ||
this.setState({ | ||
resizingKey: null | ||
resizingKey: null, | ||
resizingWidth: 0 | ||
}); | ||
if (!resizingKey || !resizingWidth) return; | ||
var column = this.columnManager.getColumn(resizingKey); | ||
this.props.onColumnResizeEnd({ | ||
column: column, | ||
width: resizingWidth | ||
}); | ||
} | ||
@@ -1166,3 +1176,4 @@ }, { | ||
onColumnSort: _utils.noop, | ||
onColumnResize: _utils.noop | ||
onColumnResize: _utils.noop, | ||
onColumnResizeEnd: _utils.noop | ||
}; | ||
@@ -1388,2 +1399,8 @@ BaseTable.propTypes = { | ||
/** | ||
* A callback function when resizing the column width ends | ||
* The handler is of the shape of `({ column, width }) => *` | ||
*/ | ||
onColumnResizeEnd: _propTypes["default"].func, | ||
/** | ||
* Adds an additional isScrolling parameter to the row renderer. | ||
@@ -1390,0 +1407,0 @@ * This parameter can be used to show a placeholder row while scrolling. |
{ | ||
"name": "react-base-table", | ||
"version": "1.8.1", | ||
"version": "1.9.0", | ||
"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
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
840743
6339