ref(tooltbox): use componentDidUpdate to trigger more changes
This commit is contained in:
parent
420c466f80
commit
a045353e6e
|
@ -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…
Reference in New Issue