fast-table
Advanced tools
Comparing version 1.2.7 to 1.2.8
@@ -60,13 +60,22 @@ 'use strict'; | ||
var paddingBottom = parseInt(_style.paddingBottom, 10) || 0; | ||
var borderLeftWidth = parseInt(_style.borderLeftWidth, 10) || 0; | ||
var borderTopWidth = parseInt(_style.borderTopWidth, 10) || 0; | ||
var borderRightWidth = parseInt(_style.borderRightWidth, 10) || 0; | ||
var borderBottomWidth = parseInt(_style.borderBottomWidth, 10) || 0; | ||
var newHeight = _height - paddingTop - paddingBottom; | ||
var newWidth = _width - paddingLeft - paddingRight; | ||
if (_style.boxSizing === 'border-box') { | ||
newHeight = newHeight - borderTopWidth - borderBottomWidth; | ||
newWidth = newWidth - borderLeftWidth - borderRightWidth; | ||
} | ||
if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) { | ||
_this.setState({ | ||
height: _height - paddingTop - paddingBottom, | ||
width: _width - paddingLeft - paddingRight | ||
}); | ||
var state = { | ||
height: newHeight, | ||
width: newWidth | ||
}; | ||
_this.setState(state); | ||
onResize({ height: _height, width: _width }); | ||
onResize(state); | ||
} | ||
@@ -73,0 +82,0 @@ } |
@@ -51,6 +51,8 @@ 'use strict'; | ||
if (dataSource && dataSource.length > 0) { | ||
height = showHeader && fixedHeader ? sizeManager._wrapperHeight - sizeManager.footerHeight - sizeManager._headerHeight : sizeManager._wrapperHeight - sizeManager.footerHeight; | ||
height = sizeManager._wrapperHeight - sizeManager.footerHeight; | ||
height = height - (showHeader && fixedHeader ? sizeManager._headerHeight : 0); | ||
} | ||
height = Math.min(height, showHeader && fixedHeader ? sizeManager._dataHeight : sizeManager._dataHeight + sizeManager._headerHeight); | ||
var dataHeight = showHeader && fixedHeader ? sizeManager._dataHeight : sizeManager._dataHeight + sizeManager._headerHeight; | ||
dataHeight = dataHeight + (sizeManager._hasScrollX ? sizeManager._scrollSizeX : 0); | ||
height = Math.min(height, dataHeight); | ||
var scrollSize = sizeManager._scrollSizeY; | ||
@@ -57,0 +59,0 @@ var style = { |
@@ -337,2 +337,3 @@ 'use strict'; | ||
this._cached = {}; | ||
this._maxRowSpan = 1; | ||
@@ -390,2 +391,5 @@ this._groupColumns = function (columns) { | ||
} | ||
if (_this12._maxRowSpan < currentRow + 1) { | ||
_this12._maxRowSpan = currentRow + 1; | ||
} | ||
grouped.push(newColumn); | ||
@@ -392,0 +396,0 @@ } |
@@ -381,3 +381,3 @@ 'use strict'; | ||
_dataHeight: _this.dataManager._bodyHeight, | ||
_headerHeight: _this.columnManager.maxRowSpan() * props.headerRowHeight, | ||
_headerHeight: _this.columnManager._maxRowSpan * props.headerRowHeight, | ||
_hasScrollX: _this.columnManager.overflowX(), | ||
@@ -445,3 +445,3 @@ _dataEmpty: _this.dataManager.isEmpty() | ||
this.sizeManager.update({ | ||
_headerHeight: this.columnManager.maxRowSpan() * this.props.headerRowHeight, | ||
_headerHeight: this.columnManager._maxRowSpan * this.props.headerRowHeight, | ||
_hasScrollX: this.columnManager.overflowX() | ||
@@ -448,0 +448,0 @@ }); |
{ | ||
"name": "fast-table", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"description": "react table fast", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -0,0 +0,0 @@ # fast-table |
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
112946
3009