Redux should update after timefilter has changed (not before) (#20719)

This commit is contained in:
Søren Louv-Jansen 2018-07-12 17:17:14 +02:00 committed by GitHub
parent db7c08ddcc
commit 423a961a1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,10 +50,14 @@ export function initTimepicker(history, dispatch) {
history.listen(() => {
updateRefreshRate(dispatch);
dispatch(updateTimePickerAction());
globalState.fetch(); // ensure global state is updated when url changes
});
// ensure that redux is notified after timefilter has updated
$scope.$listen(timefilter, 'timeUpdate', () =>
dispatch(updateTimePickerAction())
);
// ensure that timepicker updates when global state changes
registerTimefilterWithGlobalState(globalState);