From 7b1bfd55a3d6186877104e7e164323ee9a4d4f34 Mon Sep 17 00:00:00 2001 From: maksim hodasevich <47758224+dogfrogfog@users.noreply.github.com> Date: Fri, 11 Nov 2022 16:39:37 +0100 Subject: [PATCH] feat: enable "reset view" button when table item is highlighted (#1703) --- .../pyroscope-flamegraph/src/FlameGraph/FlameGraphRenderer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pyroscope-flamegraph/src/FlameGraph/FlameGraphRenderer.tsx b/packages/pyroscope-flamegraph/src/FlameGraph/FlameGraphRenderer.tsx index 9ff940d753..b9e6af1519 100644 --- a/packages/pyroscope-flamegraph/src/FlameGraph/FlameGraphRenderer.tsx +++ b/packages/pyroscope-flamegraph/src/FlameGraph/FlameGraphRenderer.tsx @@ -258,6 +258,7 @@ class FlameGraphRenderer extends Component< ...this.state.flamegraphConfigs, ...this.initialFlamegraphState, }, + selectedItem: Maybe.nothing(), }); }; @@ -310,6 +311,7 @@ class FlameGraphRenderer extends Component< setActiveItem = (item: { name: string }) => { const { name } = item; + this.setState({ isFlamegraphDirty: true }); // if clicking on the same item, undo the search if (this.state.selectedItem.isJust) { @@ -318,7 +320,6 @@ class FlameGraphRenderer extends Component< selectedItem: Maybe.nothing(), }); return; - // name = ''; } }