[Table] Retain rows in scope (#1813)

* [Table] Push rows in as they are added

...such that sorting does not cause real-time table rows to be lost.
Fixes #1738

* [Table] Test adding rows

* [Table] Fix code style in test

https://github.com/nasa/openmct/pull/1813#pullrequestreview-78277635
This commit is contained in:
Victor Woeltjen
2017-11-22 11:05:03 -08:00
committed by Pete Richards
parent 06e93ff520
commit 6bbdfcdfbe
2 changed files with 26 additions and 0 deletions

View File

@@ -170,6 +170,9 @@ define(
* @param rows
*/
TelemetryTableController.prototype.addRowsToTable = function (rows) {
rows.forEach(function (row) {
this.$scope.rows.push(row);
}, this);
this.$scope.$broadcast('add:rows', rows);
};