|
@@ -280,15 +280,15 @@ class Toolbox extends Component<Props> {
|
280
|
280
|
*
|
281
|
281
|
* @inheritdoc
|
282
|
282
|
*/
|
283
|
|
- componentWillReceiveProps(nextProps) {
|
|
283
|
+ componentDidUpdate(prevProps) {
|
284
|
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
|
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
|
292
|
this._onSetOverflowVisible(false);
|
293
|
293
|
this.props.dispatch(setToolbarHovered(false));
|
294
|
294
|
}
|