Skip to content

Commit

Permalink
Fixed issue with scrolling to row after bounds change
Browse files Browse the repository at this point in the history
  • Loading branch information
akhenry committed Oct 18, 2016
1 parent dadca62 commit 9f3ec3b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions platform/features/table/src/controllers/MCTTableController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));

};

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9f3ec3b

Please sign in to comment.