[Tables] Changed the way that new rows are added to table

Fixed failing tests
This commit is contained in:
Henry
2016-03-13 19:37:08 -07:00
parent ea0b86fe72
commit c5de90a951
7 changed files with 68 additions and 63 deletions

View File

@ -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);
}
}
});