Browse Source

ref(tooltbox): use componentDidUpdate to trigger more changes

master
Leonard Kim 7 years ago
parent
commit
a045353e6e
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      react/features/toolbox/components/web/Toolbox.js

+ 5
- 5
react/features/toolbox/components/web/Toolbox.js View File

280
      *
280
      *
281
      * @inheritdoc
281
      * @inheritdoc
282
      */
282
      */
283
-    componentWillReceiveProps(nextProps) {
283
+    componentDidUpdate(prevProps) {
284
         // Ensure the dialog is closed when the toolbox becomes hidden.
284
         // Ensure the dialog is closed when the toolbox becomes hidden.
285
-        if (this.props._overflowMenuVisible && !nextProps._visible) {
285
+        if (prevProps._overflowMenuVisible && !this.props._visible) {
286
             this._onSetOverflowVisible(false);
286
             this._onSetOverflowVisible(false);
287
         }
287
         }
288
 
288
 
289
-        if (this.props._overflowMenuVisible
290
-            && !this.props._dialog
291
-            && nextProps._dialog) {
289
+        if (prevProps._overflowMenuVisible
290
+            && !prevProps._dialog
291
+            && this.props._dialog) {
292
             this._onSetOverflowVisible(false);
292
             this._onSetOverflowVisible(false);
293
             this.props.dispatch(setToolbarHovered(false));
293
             this.props.dispatch(setToolbarHovered(false));
294
         }
294
         }

Loading…
Cancel
Save