@blueprintjs/table
Advanced tools
Comparing version 1.13.0 to 1.14.0
@@ -276,4 +276,8 @@ /** | ||
renderHotkeys(): JSX.Element; | ||
resizeRowsByTallestCell(columnIndex: number): void; | ||
/** | ||
* Resize all rows in the table to the height of the tallest visible cell in the specified columns. | ||
* If no indices are provided, default to using the tallest visible cell from all columns in view. | ||
*/ | ||
resizeRowsByTallestCell(columnIndices?: number | number[]): void; | ||
/** | ||
* When the component mounts, the HTML Element refs will be available, so | ||
@@ -280,0 +284,0 @@ * we constructor the Locator, which queries the elements' bounding |
@@ -511,5 +511,21 @@ /** | ||
}; | ||
Table.prototype.resizeRowsByTallestCell = function (columnIndex) { | ||
/** | ||
* Resize all rows in the table to the height of the tallest visible cell in the specified columns. | ||
* If no indices are provided, default to using the tallest visible cell from all columns in view. | ||
*/ | ||
Table.prototype.resizeRowsByTallestCell = function (columnIndices) { | ||
var locator = this.state.locator; | ||
var tallest = locator.getTallestVisibleCellInColumn(columnIndex); | ||
var tallest = 0; | ||
if (columnIndices == null) { | ||
// Consider all columns currently in viewport | ||
var viewportColumnIndices = this.grid.getColumnIndicesInRect(this.state.viewportRect); | ||
for (var col = viewportColumnIndices.columnIndexStart; col <= viewportColumnIndices.columnIndexEnd; col++) { | ||
tallest = Math.max(tallest, locator.getTallestVisibleCellInColumn(col)); | ||
} | ||
} | ||
else { | ||
var columnIndicesArray = Array.isArray(columnIndices) ? columnIndices : [columnIndices]; | ||
var tallestByColumns = columnIndicesArray.map(function (col) { return locator.getTallestVisibleCellInColumn(col); }); | ||
tallest = Math.max.apply(Math, tallestByColumns); | ||
} | ||
var rowHeights = Array(this.state.rowHeights.length).fill(tallest); | ||
@@ -516,0 +532,0 @@ this.invalidateGrid(); |
{ | ||
"name": "@blueprintjs/table", | ||
"version": "1.13.0", | ||
"version": "1.14.0", | ||
"description": "Scalable interactive table component", | ||
@@ -37,5 +37,5 @@ "main": "dist/index.js", | ||
"react": "15.5.1", | ||
"react-addons-css-transition-group": "15.5.1", | ||
"react-addons-test-utils": "15.5.1", | ||
"react-dom": "15.5.1", | ||
"react-transition-group": "1.1.3", | ||
"style-loader": "0.13.1", | ||
@@ -42,0 +42,0 @@ "typescript": "2.1.5", |
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 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
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
1857453
20141