Skip to content

Commit

Permalink
Reload on global fetch event and emit vis:ready (#12805)
Browse files Browse the repository at this point in the history
this  fixes 
- the issue where adding a saved search panel after adding a visualization, would cause the panel to remain empty.
- clicking the magnifier glass int he query-bar on the dashboard page not refreshes the visualization
  • Loading branch information
ppisljar authored and thomasneirynck committed Jul 12, 2017
1 parent e395798 commit 9c09104
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/public/visualize/visualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ uiModules
$scope.fetch();
};
$scope.vis.on('reload', reload);
$scope.$on('courier:searchRefresh', reload);
// dashboard will fire fetch event when it wants to refresh
$scope.$on('fetch', reload);

if ($scope.appState) {
let oldUiState;
Expand Down Expand Up @@ -135,6 +136,7 @@ uiModules
});

$scope.fetch();
$scope.$root.$broadcast('ready:vis');
}
};
});

0 comments on commit 9c09104

Please sign in to comment.