ref(tooltbox): use componentDidUpdate to trigger more changes

pull/3584/head
Leonard Kim 7 years ago committed by Leonard Kim
parent 420c466f80
commit a045353e6e
  1. 10
      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));
}

Loading…
Cancel
Save