@@ -10,6 +10,7 @@ import React, { useEffect, useMemo, useState } from 'react';
10
10
import styled from 'styled-components' ;
11
11
import deepEqual from 'fast-deep-equal' ;
12
12
13
+ import { useDispatch } from 'react-redux' ;
13
14
import { Direction } from '../../../../common/search_strategy' ;
14
15
import { BrowserFields , DocValueFields } from '../../containers/source' ;
15
16
import { useTimelineEvents } from '../../../timelines/containers' ;
@@ -165,14 +166,15 @@ const EventsViewerComponent: React.FC<Props> = ({
165
166
utilityBar,
166
167
graphEventId,
167
168
} ) => {
169
+ const dispatch = useDispatch ( ) ;
168
170
const { globalFullScreen, setGlobalFullScreen } = useGlobalFullScreen ( ) ;
169
171
const columnsHeader = isEmpty ( columns ) ? defaultHeaders : columns ;
170
172
const kibana = useKibana ( ) ;
171
173
const [ isQueryLoading , setIsQueryLoading ] = useState ( false ) ;
172
174
173
175
useEffect ( ( ) => {
174
- timelineActions . updateIsLoading ( { id, isLoading : isQueryLoading } ) ;
175
- } , [ id , isQueryLoading ] ) ;
176
+ dispatch ( timelineActions . updateIsLoading ( { id, isLoading : isQueryLoading } ) ) ;
177
+ } , [ dispatch , id , isQueryLoading ] ) ;
176
178
177
179
const getManageTimeline = useMemo ( ( ) => timelineSelectors . getManageTimelineById ( ) , [ ] ) ;
178
180
const unit = useMemo ( ( ) => ( n : number ) => i18n . UNIT ( n ) , [ ] ) ;
0 commit comments