Skip to content

Commit

Permalink
Merge pull request #8422 from thomasneirynck/fix/8322
Browse files Browse the repository at this point in the history
Ensure table updates when page settings update
  • Loading branch information
thomasneirynck authored Sep 22, 2016
2 parents 4552643 + 0cf2202 commit e4f0ac8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core_plugins/table_vis/public/table_vis_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e4f0ac8

Please sign in to comment.