Skip to content

Commit

Permalink
[docTable/row] delay first render until watchers initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Nov 23, 2016
1 parent a0a1fbd commit 4945e08
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/ui/public/doc_table/components/table_row.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ module.directive('kbnTableRow', function ($compile) {
$el.after('<tr>');
$el.empty();

let init = function () {
createSummaryRow($scope.row, $scope.row._id);
};

// when we compile the details, we use this $scope
let $detailsScope;

Expand Down Expand Up @@ -79,11 +75,11 @@ module.directive('kbnTableRow', function ($compile) {
$compile($detailsTr)($detailsScope);
};

$scope.$watchCollection('columns', function () {
createSummaryRow($scope.row, $scope.row._id);
});

$scope.$watchMulti(['indexPattern.timeFieldName', 'row.highlight'], function () {
$scope.$watchMulti([
'indexPattern.timeFieldName',
'row.highlight',
'[]columns'
], function () {
createSummaryRow($scope.row, $scope.row._id);
});

Expand Down Expand Up @@ -161,8 +157,6 @@ module.directive('kbnTableRow', function ($compile) {

return text;
}

init();
}
};
});

0 comments on commit 4945e08

Please sign in to comment.