From b7c7f710789c96a88aeb1d093ef77a3306b5289f Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 2 May 2023 04:02:38 -0400 Subject: [PATCH] [8.8] [Synthetics] Do not re-render embeddable visualizations on detail/history page `onLoad` (#156219) (#156327) # Backport This will backport the following commits from `main` to `8.8`: - [[Synthetics] Do not re-render embeddable visualizations on detail/history page `onLoad` (#156219)](https://github.com/elastic/kibana/pull/156219) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Justin Kambic --- .../components/shared/exploratory_view/embeddable/index.tsx | 2 +- .../shared/exploratory_view/embeddable/use_app_data_view.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx index 85fb195d29d4f..aa07c2c2d3551 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/index.tsx @@ -138,7 +138,7 @@ export function getExploratoryViewEmbeddable( {...embedProps} dataViewState={dataViews} lens={lens} - lensFormulaHelper={lensHelper.formula} + lensFormulaHelper={lensHelper?.formula} searchSessionId={services.data.search.session.getSessionId()} onLoad={onLensLoaded} /> diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts index ab1ca8827c58a..0852c98bb3dc9 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/embeddable/use_app_data_view.ts @@ -48,5 +48,5 @@ export const useAppDataView = ({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [dataViewTitle, seriesDataType, JSON.stringify(series)]); - return { dataViews, loading }; + return { dataViews, loading: loading && !dataViews[seriesDataType] }; };