fixed-data-table-2
Advanced tools
Comparing version 0.8.2 to 0.8.3
@@ -953,26 +953,2 @@ 'use strict'; | ||
// Figure out if the vertical scrollbar will be visible first, | ||
// because it will determine the width of the table | ||
var useGroupHeader = false; | ||
var groupHeaderHeight = 0; | ||
if (children.length && children[0].type.__TableColumnGroup__) { | ||
useGroupHeader = true; | ||
groupHeaderHeight = props.groupHeaderHeight; | ||
} | ||
var useMaxHeight = props.height === undefined; | ||
var height = Math.round(useMaxHeight ? props.maxHeight : props.height); | ||
var totalHeightReserved = props.footerHeight + props.headerHeight + groupHeaderHeight + 2 * BORDER_HEIGHT; | ||
var bodyHeight = height - totalHeightReserved; | ||
var scrollContentHeight = this._scrollHelper.getContentHeight(); | ||
var totalHeightNeeded = scrollContentHeight + totalHeightReserved; | ||
var maxScrollY = Math.max(0, scrollContentHeight - bodyHeight); | ||
// If vertical scrollbar is necessary, adjust the table width to give it room | ||
var adjustedWidth = props.width; | ||
if (maxScrollY) { | ||
adjustedWidth = adjustedWidth - _Scrollbar2.default.SIZE - 1; | ||
} | ||
var scrollState; | ||
@@ -1010,2 +986,26 @@ var firstRowIndex = oldState && oldState.firstRowIndex || 0; | ||
// Figure out if the vertical scrollbar will be visible first, | ||
// because it will determine the width of the table | ||
var useGroupHeader = false; | ||
var groupHeaderHeight = 0; | ||
if (children.length && children[0].type.__TableColumnGroup__) { | ||
useGroupHeader = true; | ||
groupHeaderHeight = props.groupHeaderHeight; | ||
} | ||
var useMaxHeight = props.height === undefined; | ||
var height = Math.round(useMaxHeight ? props.maxHeight : props.height); | ||
var totalHeightReserved = props.footerHeight + props.headerHeight + groupHeaderHeight + 2 * BORDER_HEIGHT; | ||
var bodyHeight = height - totalHeightReserved; | ||
var scrollContentHeight = this._scrollHelper.getContentHeight(); | ||
var totalHeightNeeded = scrollContentHeight + totalHeightReserved; | ||
var maxScrollY = Math.max(0, scrollContentHeight - bodyHeight); | ||
// If vertical scrollbar is necessary, adjust the table width to give it room | ||
var adjustedWidth = props.width; | ||
if (maxScrollY) { | ||
adjustedWidth = adjustedWidth - _Scrollbar2.default.SIZE - 1; | ||
} | ||
var lastScrollToRow = oldState ? oldState.scrollToRow : undefined; | ||
@@ -1012,0 +1012,0 @@ if (props.scrollToRow != null && (props.scrollToRow !== lastScrollToRow || viewportHeight !== oldViewportHeight)) { |
@@ -39,3 +39,3 @@ /** | ||
FixedDataTableRoot.version = '0.8.2'; | ||
FixedDataTableRoot.version = '0.8.3'; | ||
module.exports = FixedDataTableRoot; |
{ | ||
"name": "fixed-data-table-2", | ||
"version": "0.8.2", | ||
"version": "0.8.3", | ||
"description": "A React table component designed to allow presenting thousands of rows of data.", | ||
@@ -5,0 +5,0 @@ "main": "main.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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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