diff --git a/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx index 8353a0068d214a..3cb8d6a6182bf1 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/integrated/index.tsx @@ -323,33 +323,31 @@ const TGridIntegratedComponent: React.FC = ({ /> )} {totalCountMinusDeleted > 0 && ( - <> - - + )} diff --git a/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx b/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx index 83d578e1d23adc..bfa5469a19c00b 100644 --- a/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx +++ b/x-pack/plugins/timelines/public/components/t_grid/standalone/index.tsx @@ -4,15 +4,17 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiLoadingContent } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n/react'; import { isEmpty } from 'lodash/fp'; -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useMemo, useState, useRef } from 'react'; import styled from 'styled-components'; import { useDispatch, useSelector } from 'react-redux'; import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; import { Direction, EntityType } from '../../../../common/search_strategy'; import type { CoreStart } from '../../../../../../../src/core/public'; import { TGridCellAction, TimelineTabs } from '../../../../common/types/timeline'; + import type { CellValueElementProps, ColumnHeaderOptions, @@ -36,7 +38,6 @@ import { tGridActions, tGridSelectors } from '../../../store/t_grid'; import type { State } from '../../../store/t_grid'; import { useTimelineEvents } from '../../../container'; import { StatefulBody } from '../body'; -import { Footer, footerHeight } from '../footer'; import { LastUpdatedAt } from '../..'; import { SELECTOR_TIMELINE_GLOBAL_CONTAINER, UpdatedFlexItem, UpdatedFlexGroup } from '../styles'; import { InspectButton, InspectButtonContainer } from '../../inspect'; @@ -299,9 +300,17 @@ const TGridStandaloneComponent: React.FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, []); + const isFirstUpdate = useRef(true); + useEffect(() => { + if (isFirstUpdate.current && !loading) { + isFirstUpdate.current = false; + } + }, [loading]); + return ( + {isFirstUpdate.current && } {canQueryTimeline ? ( <> = ({ - - - -