Ensure table updates when page settings update

The entire table should also refresh when one of the options changes. Otherwise,
the rows are not filled in correctly to the bottom of the page.
This commit is contained in:
Thomas Neirynck 2016-09-21 19:38:29 -04:00
parent bde2591501
commit 0cf2202299

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;