Comparing version 3.4.1 to 3.4.2
@@ -237,5 +237,2 @@ 'use strict'; | ||
value: function handleDestroy(key) { | ||
if (this.menuDestroyed) { | ||
return; | ||
} | ||
var state = this.state; | ||
@@ -245,7 +242,9 @@ var selectedKeys = state.selectedKeys; | ||
if (index !== -1) { | ||
selectedKeys = selectedKeys.concat([]); | ||
//selectedKeys = selectedKeys.concat([]); | ||
selectedKeys.splice(index, 1); | ||
this.setState({ | ||
selectedKeys: selectedKeys | ||
}); | ||
// can not call setState in unmount, will cause render and update unmounted children | ||
// https://github.com/facebook/react/pull/3795 | ||
//this.setState({ | ||
// selectedKeys: selectedKeys | ||
//}); | ||
} | ||
@@ -276,7 +275,2 @@ } | ||
}, { | ||
key: 'componentWillUnmount', | ||
value: function componentWillUnmount() { | ||
this.menuDestroyed = true; | ||
} | ||
}, { | ||
key: 'render', | ||
@@ -283,0 +277,0 @@ value: function render() { |
{ | ||
"name": "rc-menu", | ||
"version": "3.4.1", | ||
"version": "3.4.2", | ||
"description": "menu ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38769
829