[Synthetics] Do not re-render embeddable visualizations on detail/history page onLoad (#156219)

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
This commit is contained in:
Justin Kambic 2023-05-02 02:50:02 -04:00 committed by GitHub
parent 527ab4b2da
commit 7b947188f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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}
/>

View file

@ -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] };
};