Skip to content

Commit

Permalink
[Synthetics] Do not re-render embeddable visualizations on detail/his…
Browse files Browse the repository at this point in the history
…tory page `onLoad` (elastic#156219)

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
(cherry picked from commit 7b94718)
  • Loading branch information
justinkambic committed May 2, 2023
1 parent 52c7918 commit 1a9d43a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] };
};

0 comments on commit 1a9d43a

Please sign in to comment.