From c1d5e2d55e2edb6d13dca9174e25a2af8973640d Mon Sep 17 00:00:00 2001 From: Prashant Mangukiya Date: Tue, 30 Nov 2021 22:01:35 +0530 Subject: [PATCH] Corrected Cannot Remove Yourself banner shown again and again problem --- .../CheckboxWithTooltipForMobileWebAndNative.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js b/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js index c99cf59d901..ac58d030e96 100644 --- a/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js +++ b/src/components/CheckboxWithTooltip/CheckboxWithTooltipForMobileWebAndNative.js @@ -11,12 +11,14 @@ class CheckboxWithTooltipForMobileWebAndNative extends React.Component { this.showGrowlOrTriggerOnPress = this.showGrowlOrTriggerOnPress.bind(this); } - componentDidUpdate() { + componentDidUpdate(prevProps) { if (!this.props.toggleTooltip) { return; } - Growl.show(this.props.text, this.props.growlType, 3000); + if (prevProps.toggleTooltip !== this.props.toggleTooltip) { + Growl.show(this.props.text, this.props.growlType, 3000); + } } /**