mirror of
https://github.com/nasa/openmct.git
synced 2025-06-23 01:18:57 +00:00
[Tables] Changed the way that new rows are added to table
Fixed failing tests
This commit is contained in:
@ -83,12 +83,19 @@ define(
|
||||
}
|
||||
|
||||
function updateData(){
|
||||
var datum;
|
||||
var datum,
|
||||
row;
|
||||
self.handle.getTelemetryObjects().forEach(function(telemetryObject){
|
||||
datum = self.handle.getDatum(telemetryObject);
|
||||
if (datum) {
|
||||
var rowValue = self.table.getRowValues(telemetryObject, datum);
|
||||
self.$scope.$broadcast('addRow', rowValue);
|
||||
row = self.table.getRowValues(telemetryObject, datum);
|
||||
self.$scope.rows = self.$scope.rows || [];
|
||||
if (!self.$scope.rows){
|
||||
self.$scope.rows = [row];
|
||||
} else {
|
||||
self.$scope.rows.push(row);
|
||||
self.$scope.$broadcast('add:row', self.$scope.rows.length - 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user