Skip to content

Commit

Permalink
[ML] Fixes timefilter refresh subscription.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Aug 22, 2019
1 parent 3d1c43d commit aa9555d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ export const TopNav: FC = () => {
isAutoRefreshOnly={!isTimeRangeSelectorEnabled}
refreshInterval={refreshInterval.value}
onTimeChange={updateFilter}
onRefresh={() => mlTimefilterRefresh$.next()}
onRefresh={() => {
// This check is a workaround to catch a bug in EuiSuperDatePicker which
// might not have disabled the refresh interval after a props change.
if (!refreshInterval.pause) {
mlTimefilterRefresh$.next();
}
}}
onRefreshChange={updateInterval}
recentlyUsedRanges={recentlyUsedRanges}
dateFormat={dateFormat}
Expand Down

0 comments on commit aa9555d

Please sign in to comment.