Skip to content

Commit

Permalink
Backport PR elastic#8422
Browse files Browse the repository at this point in the history
---------

**Commit 1:**
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.

* Original sha: 0cf2202
* Authored by Thomas Neirynck <thomas@elastic.co> on 2016-09-21T23:38:29Z
  • Loading branch information
elastic-jasper committed Sep 22, 2016
1 parent 9876c88 commit 8823761
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 8823761

Please sign in to comment.