From 9f3ec3b18f96bc4050ef3e3df718f4b20a1f87ab Mon Sep 17 00:00:00 2001 From: Henry Date: Tue, 18 Oct 2016 16:31:59 -0700 Subject: [PATCH] Fixed issue with scrolling to row after bounds change --- .../src/controllers/MCTTableController.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/platform/features/table/src/controllers/MCTTableController.js b/platform/features/table/src/controllers/MCTTableController.js index 99bd8451013..bdc2d47fb04 100644 --- a/platform/features/table/src/controllers/MCTTableController.js +++ b/platform/features/table/src/controllers/MCTTableController.js @@ -544,14 +544,14 @@ define( } this.$scope.displayRows = this.filterAndSort(newRows || []); - this.resize(newRows).then(function() { - this.setVisibleRows(); - - var timeOfInterest = this.conductor.timeOfInterest(); - if (timeOfInterest) { - this.setTimeOfInterest(timeOfInterest); - } - }.bind(this)); + this.resize(newRows).then(this.setVisibleRows) + .then(this.timeout) + .then(function() { + var timeOfInterest = this.conductor.timeOfInterest(); + if (timeOfInterest) { + this.setTimeOfInterest(timeOfInterest); + } + }.bind(this)); }; @@ -615,7 +615,7 @@ define( && newTOI && this.$scope.displayRows.length > 0) { var formattedTOI = this.toiFormatter.format(newTOI); - // searchElement, min, max + // array, searchElement, min, max this.$scope.toiRowIndex = this.binarySearch(this.$scope.displayRows, formattedTOI, 0, this.$scope.displayRows.length - 1); this.scrollToRow(this.$scope.toiRowIndex);