Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

ref(tooltbox): use componentDidUpdate to trigger more changes

Leonard Kima045353e6e74
diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js
index 88890386e6..026fd18df8 100644
--- a/react/features/toolbox/components/web/Toolbox.js
+++ b/react/features/toolbox/components/web/Toolbox.js
@@ -280,15 +280,15 @@ class Toolbox extends Component<Props> {
*
* @inheritdoc
*/
- componentWillReceiveProps(nextProps) {
+ componentDidUpdate(prevProps) {
// Ensure the dialog is closed when the toolbox becomes hidden.
- if (this.props._overflowMenuVisible && !nextProps._visible) {
+ if (prevProps._overflowMenuVisible && !this.props._visible) {
this._onSetOverflowVisible(false);
}
- if (this.props._overflowMenuVisible
- && !this.props._dialog
- && nextProps._dialog) {
+ if (prevProps._overflowMenuVisible
+ && !prevProps._dialog
+ && this.props._dialog) {
this._onSetOverflowVisible(false);
this.props.dispatch(setToolbarHovered(false));
}