Browse Source

fix: avoid false triggering CDU in SlidingView

j8
Bettenbuk Zoltan 6 years ago
parent
commit
0e6f14bb7c
1 changed files with 6 additions and 2 deletions
  1. 6
    2
      react/features/base/react/components/native/SlidingView.js

+ 6
- 2
react/features/base/react/components/native/SlidingView.js View File

@@ -128,8 +128,12 @@ export default class SlidingView extends PureComponent<Props, State> {
128 128
      *
129 129
      * @inheritdoc
130 130
      */
131
-    componentDidUpdate() {
132
-        this._setShow(this.props.show);
131
+    componentDidUpdate(prevProps: Props) {
132
+        const { show } = this.props;
133
+
134
+        if (prevProps.show !== show) {
135
+            this._setShow(show);
136
+        }
133 137
     }
134 138
 
135 139
     /**

Loading…
Cancel
Save