From 64119a3e35363818ebfbdc79d32b9a47cc9071d0 Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Wed, 13 Nov 2024 20:03:57 +0100 Subject: [PATCH] [Discover] Reduce histogram updates --- .../unified_histogram/public/chart/hooks/use_lens_props.ts | 2 +- test/functional/apps/discover/group3/_lens_vis.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts b/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts index 155a38ea9a0a..5d63bef2a04b 100644 --- a/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts +++ b/src/plugins/unified_histogram/public/chart/hooks/use_lens_props.ts @@ -46,7 +46,7 @@ export const useLensProps = ({ }; }, [visContext, getTimeRange, onLoad, request?.searchSessionId]); - const [lensPropsContext, setLensPropsContext] = useState(buildLensProps()); + const [lensPropsContext, setLensPropsContext] = useState(() => buildLensProps()); const updateLensPropsContext = useStableCallback(() => setLensPropsContext(buildLensProps())); useEffect(() => { diff --git a/test/functional/apps/discover/group3/_lens_vis.ts b/test/functional/apps/discover/group3/_lens_vis.ts index 03641ee5bcb4..0864382cad7a 100644 --- a/test/functional/apps/discover/group3/_lens_vis.ts +++ b/test/functional/apps/discover/group3/_lens_vis.ts @@ -110,8 +110,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return seriesType; } - // FLAKY: https://github.com/elastic/kibana/issues/184600 - describe.skip('discover lens vis', function () { + describe('discover lens vis', function () { before(async () => { await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');