react-native-popover-view
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -339,2 +339,4 @@ var __extends = (this && this.__extends) || (function () { | ||
_this._isMounted = false; | ||
_this.keyboardDidHideSubscription = null; | ||
_this.keyboardDidShowSubscription = null; | ||
return _this; | ||
@@ -371,4 +373,10 @@ } | ||
Dimensions.removeEventListener('change', this.handleResizeEvent); | ||
Keyboard.removeListener('keyboardDidShow', this.keyboardDidShow); | ||
Keyboard.removeListener('keyboardDidHide', this.keyboardDidHide); | ||
if (this.keyboardDidShowSubscription !== null) { | ||
this.keyboardDidShowSubscription.remove(); | ||
this.keyboardDidShowSubscription = null; | ||
} | ||
if (this.keyboardDidHideSubscription !== null) { | ||
this.keyboardDidHideSubscription.remove(); | ||
this.keyboardDidHideSubscription = null; | ||
} | ||
}; | ||
@@ -542,4 +550,4 @@ AdaptivePopover.prototype.componentDidUpdate = function (prevProps) { | ||
_this.debug('Setting up keyboard listeners'); | ||
Keyboard.addListener('keyboardDidShow', _this.keyboardDidShow); | ||
Keyboard.addListener('keyboardDidHide', _this.keyboardDidHide); | ||
_this.keyboardDidShowSubscription = Keyboard.addListener('keyboardDidShow', _this.keyboardDidShow); | ||
_this.keyboardDidHideSubscription = Keyboard.addListener('keyboardDidHide', _this.keyboardDidHide); | ||
_this.displayAreaStore = _this.getDisplayArea(); | ||
@@ -550,4 +558,10 @@ }, onCloseStart: function () { | ||
_this.debug('Tearing down keyboard listeners'); | ||
Keyboard.removeListener('keyboardDidShow', _this.keyboardDidShow); | ||
Keyboard.removeListener('keyboardDidHide', _this.keyboardDidHide); | ||
if (_this.keyboardDidShowSubscription !== null) { | ||
_this.keyboardDidShowSubscription.remove(); | ||
_this.keyboardDidShowSubscription = null; | ||
} | ||
if (_this.keyboardDidHideSubscription !== null) { | ||
_this.keyboardDidHideSubscription.remove(); | ||
_this.keyboardDidHideSubscription = null; | ||
} | ||
if (_this._isMounted) | ||
@@ -554,0 +568,0 @@ _this.setState({ shiftedDisplayArea: null }); |
{ | ||
"name": "react-native-popover-view", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "A <Popover /> component for react-native iOS, Android, and Web", | ||
@@ -61,3 +61,3 @@ "main": "dist/index.js", | ||
"react-dom": "^17.0.2", | ||
"react-native": "^0.64.0", | ||
"react-native": "^0.65.1", | ||
"react-test-renderer": "^17.0.2", | ||
@@ -64,0 +64,0 @@ "typescript": "^4.2.4" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
289418
3932