rsuite-table
Advanced tools
Comparing version 3.9.2 to 3.9.3
@@ -0,4 +1,8 @@ | ||
# 3.9.3 | ||
- **Bugfix**: Fixed the problem that the `resizable` property of the columns of the table would not work. | ||
# 3.9.2 | ||
- **Bugfix**: Fixed incorrect scroll bar position when manually triggering the scroll method | ||
- **Bugfix**: Fixed incorrect scroll bar position when manually triggering the scroll method. | ||
- **Bugfix**: Fixed table cannot adjust column width. | ||
@@ -5,0 +9,0 @@ - **Bugfix**: Fixed misalignment of table header text. |
@@ -11,3 +11,2 @@ import * as React from 'react'; | ||
height?: number; | ||
initialEvent?: object; | ||
columnWidth?: number; | ||
@@ -14,0 +13,0 @@ columnLeft?: number; |
@@ -51,2 +51,5 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
_this.mouseMoveTracker = _this.getMouseMoveTracker(); | ||
_this.mouseMoveTracker.captureMouseMoves(event); | ||
_this.isKeyDown = true; | ||
@@ -73,6 +76,2 @@ _this.cursorDelta = 0; | ||
_proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { | ||
if (nextProps.initialEvent && this.isKeyDown && this.mouseMoveTracker && !this.mouseMoveTracker.isDragging()) { | ||
this.mouseMoveTracker.captureMouseMoves(nextProps.initialEvent); | ||
} | ||
if (nextProps.columnWidth !== this.props.columnWidth) { | ||
@@ -134,3 +133,2 @@ this.columnWidth = nextProps.columnWidth; | ||
height: PropTypes.number, | ||
initialEvent: PropTypes.object, | ||
columnWidth: PropTypes.number, | ||
@@ -137,0 +135,0 @@ columnLeft: PropTypes.number, |
@@ -33,3 +33,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
_this.handleColumnResizeStart = function (event) { | ||
_this.handleColumnResizeStart = function () { | ||
var _this$props = _this.props, | ||
@@ -39,7 +39,2 @@ left = _this$props.left, | ||
onColumnResizeStart = _this$props.onColumnResizeStart; | ||
_this.setState({ | ||
initialEvent: event | ||
}); | ||
onColumnResizeStart === null || onColumnResizeStart === void 0 ? void 0 : onColumnResizeStart(_this.state.columnWidth, left, !!fixed); | ||
@@ -92,5 +87,3 @@ }; | ||
headerHeight = _this$props4.headerHeight; | ||
var _this$state = this.state, | ||
columnWidth = _this$state.columnWidth, | ||
initialEvent = _this$state.initialEvent; | ||
var columnWidth = this.state.columnWidth; | ||
@@ -106,3 +99,2 @@ if (!resizable) { | ||
height: headerHeight ? headerHeight - 1 : undefined, | ||
initialEvent: initialEvent, | ||
onColumnResizeMove: onColumnResizeMove, | ||
@@ -109,0 +101,0 @@ onColumnResizeStart: this.handleColumnResizeStart, |
@@ -11,3 +11,2 @@ import * as React from 'react'; | ||
height?: number; | ||
initialEvent?: object; | ||
columnWidth?: number; | ||
@@ -14,0 +13,0 @@ columnLeft?: number; |
@@ -69,2 +69,5 @@ "use strict"; | ||
_this.mouseMoveTracker = _this.getMouseMoveTracker(); | ||
_this.mouseMoveTracker.captureMouseMoves(event); | ||
_this.isKeyDown = true; | ||
@@ -91,6 +94,2 @@ _this.cursorDelta = 0; | ||
_proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { | ||
if (nextProps.initialEvent && this.isKeyDown && this.mouseMoveTracker && !this.mouseMoveTracker.isDragging()) { | ||
this.mouseMoveTracker.captureMouseMoves(nextProps.initialEvent); | ||
} | ||
if (nextProps.columnWidth !== this.props.columnWidth) { | ||
@@ -150,3 +149,2 @@ this.columnWidth = nextProps.columnWidth; | ||
height: _propTypes["default"].number, | ||
initialEvent: _propTypes["default"].object, | ||
columnWidth: _propTypes["default"].number, | ||
@@ -153,0 +151,0 @@ columnLeft: _propTypes["default"].number, |
@@ -50,3 +50,3 @@ "use strict"; | ||
_this.handleColumnResizeStart = function (event) { | ||
_this.handleColumnResizeStart = function () { | ||
var _this$props = _this.props, | ||
@@ -56,7 +56,2 @@ left = _this$props.left, | ||
onColumnResizeStart = _this$props.onColumnResizeStart; | ||
_this.setState({ | ||
initialEvent: event | ||
}); | ||
onColumnResizeStart === null || onColumnResizeStart === void 0 ? void 0 : onColumnResizeStart(_this.state.columnWidth, left, !!fixed); | ||
@@ -109,5 +104,3 @@ }; | ||
headerHeight = _this$props4.headerHeight; | ||
var _this$state = this.state, | ||
columnWidth = _this$state.columnWidth, | ||
initialEvent = _this$state.initialEvent; | ||
var columnWidth = this.state.columnWidth; | ||
@@ -123,3 +116,2 @@ if (!resizable) { | ||
height: headerHeight ? headerHeight - 1 : undefined, | ||
initialEvent: initialEvent, | ||
onColumnResizeMove: onColumnResizeMove, | ||
@@ -126,0 +118,0 @@ onColumnResizeStart: this.handleColumnResizeStart, |
{ | ||
"name": "rsuite-table", | ||
"version": "3.9.2", | ||
"version": "3.9.3", | ||
"description": "A React table component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -11,3 +11,2 @@ import * as React from 'react'; | ||
height?: number; | ||
initialEvent?: object; | ||
columnWidth?: number; | ||
@@ -14,0 +13,0 @@ columnLeft?: number; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
370587
7985