From 2e2fc433a623c170c2a0dc4c8cbf2ed796cc758b Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Thu, 12 Aug 2021 10:36:09 -0400 Subject: [PATCH] fix(trace-navigator): Trace not found alert dismiss button The component is not updating when the state changes. This ensures to check that when the state changes from the dismiss button, the alert is removed. --- .../quickTrace/issueQuickTrace.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/app/views/organizationGroupDetails/quickTrace/issueQuickTrace.tsx b/static/app/views/organizationGroupDetails/quickTrace/issueQuickTrace.tsx index 2ecdbe3448cfe4..eb8590846b2baa 100644 --- a/static/app/views/organizationGroupDetails/quickTrace/issueQuickTrace.tsx +++ b/static/app/views/organizationGroupDetails/quickTrace/issueQuickTrace.tsx @@ -42,8 +42,11 @@ class IssueQuickTrace extends Component { this.promptsCheck(); } - shouldComponentUpdate(nextProps) { - return this.props.event !== nextProps.event; + shouldComponentUpdate(nextProps, nextState: State) { + return ( + this.props.event !== nextProps.event || + this.state.shouldShow !== nextState.shouldShow + ); } async promptsCheck() {