From b696c4f57e774be2213a5a07ac58f49c4610ba24 Mon Sep 17 00:00:00 2001 From: Chris Lewis Date: Thu, 19 Oct 2017 15:12:11 -0700 Subject: [PATCH] Prepare Release table-1.29.1 (#1742) * [Table] Add null-checks when accessing rowHeaderElement (#1735) * Prepare Release table-1.29.1 --- docs/docs/site-docs.js | 6 ++++-- packages/site-docs/package.json | 2 +- packages/table/package.json | 2 +- packages/table/src/table.tsx | 6 +++++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/docs/site-docs.js b/docs/docs/site-docs.js index 69920aa9ab..68a1816567 100644 --- a/docs/docs/site-docs.js +++ b/docs/docs/site-docs.js @@ -81045,7 +81045,9 @@ this.scrollContainerElement.scrollTop = nextScrollTop + topCorrection; } if (didScrollLeftChange) { - var leftCorrection = this.shouldDisableHorizontalScroll() ? 0 : this.rowHeaderElement.clientWidth; + var leftCorrection = this.shouldDisableHorizontalScroll() || this.rowHeaderElement == null + ? 0 + : this.rowHeaderElement.clientWidth; this.scrollContainerElement.scrollLeft = nextScrollLeft + leftCorrection; } var nextViewportRect = new rect_1.Rect(nextScrollLeft, nextScrollTop, viewportRect.width, viewportRect.height); @@ -83778,7 +83780,7 @@ /* 665 */ /***/ (function(module, exports) { - module.exports = [{"name":"@blueprintjs/core","version":"1.32.0"},{"name":"@blueprintjs/datetime","version":"1.23.0"},{"name":"@blueprintjs/docs","version":"1.1.1"},{"name":"@blueprintjs/labs","version":"0.12.0"},{"name":"@blueprintjs/table","version":"1.29.0"}] + module.exports = [{"name":"@blueprintjs/core","version":"1.32.0"},{"name":"@blueprintjs/datetime","version":"1.23.0"},{"name":"@blueprintjs/docs","version":"1.1.1"},{"name":"@blueprintjs/labs","version":"0.12.0"},{"name":"@blueprintjs/table","version":"1.29.1"}] /***/ }), /* 666 */ diff --git a/packages/site-docs/package.json b/packages/site-docs/package.json index 218090ef65..9a22a22bca 100644 --- a/packages/site-docs/package.json +++ b/packages/site-docs/package.json @@ -8,7 +8,7 @@ "@blueprintjs/datetime": "^1.23.0", "@blueprintjs/docs": "^1.1.1", "@blueprintjs/labs": "^0.12.0", - "@blueprintjs/table": "^1.29.0", + "@blueprintjs/table": "^1.29.1", "bourbon": "^4.2.2", "chroma-js": "^1.3.4", "classnames": "^2.2.5", diff --git a/packages/table/package.json b/packages/table/package.json index c68f4786a7..71d9b9a058 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -1,6 +1,6 @@ { "name": "@blueprintjs/table", - "version": "1.29.0", + "version": "1.29.1", "description": "Scalable interactive table component", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/packages/table/src/table.tsx b/packages/table/src/table.tsx index 473d3567a5..da094c4247 100644 --- a/packages/table/src/table.tsx +++ b/packages/table/src/table.tsx @@ -1999,7 +1999,11 @@ export class Table extends AbstractComponent { this.scrollContainerElement.scrollTop = nextScrollTop + topCorrection; } if (didScrollLeftChange) { - const leftCorrection = this.shouldDisableHorizontalScroll() ? 0 : this.rowHeaderElement.clientWidth; + const leftCorrection = + this.shouldDisableHorizontalScroll() || this.rowHeaderElement == null + ? 0 + : this.rowHeaderElement.clientWidth; + this.scrollContainerElement.scrollLeft = nextScrollLeft + leftCorrection; }