Merge pull request #8428 from elastic/jasper/backport/8422/5.0

[backport] PR #8422 to 5.0
This commit is contained in:
Thomas Neirynck 2016-09-22 10:36:43 -04:00 committed by GitHub
commit 3f0f105fc9

View file

@ -19,7 +19,13 @@ module.controller('KbnTableVisController', function ($scope, Private) {
$scope.uiState.set('vis.params.sort', newSort);
});
$scope.$watch('esResponse', function (resp, oldResp) {
/**
* Recreate the entire table when:
* - the underlying data changes (esResponse)
* - one of the view options changes (vis.params)
*/
$scope.$watchMulti(['esResponse', 'vis.params'], function ([resp]) {
let tableGroups = $scope.tableGroups = null;
let hasSomeRows = $scope.hasSomeRows = null;