From 4c4bc3bd32403378c9abe047a05946423677571c Mon Sep 17 00:00:00 2001 From: Joey Tawadrous <90795735+joey-grafana@users.noreply.github.com> Date: Tue, 13 Dec 2022 09:40:38 +0000 Subject: [PATCH] Phlare: Reset flame graph after query is run (#59609) Reset flame graph after query is run --- .../panel/flamegraph/components/FlameGraphContainer.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/app/plugins/panel/flamegraph/components/FlameGraphContainer.tsx b/public/app/plugins/panel/flamegraph/components/FlameGraphContainer.tsx index 4ef6959a339..c7272440ed1 100644 --- a/public/app/plugins/panel/flamegraph/components/FlameGraphContainer.tsx +++ b/public/app/plugins/panel/flamegraph/components/FlameGraphContainer.tsx @@ -54,6 +54,12 @@ const FlameGraphContainer = (props: Props) => { } }, [selectedView, setSelectedView, containerWidth]); + useEffect(() => { + setTopLevelIndex(0); + setRangeMin(0); + setRangeMax(1); + }, [props.data]); + return (