We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 425736b commit aa8d623Copy full SHA for aa8d623
lib/KeyboardAwareHOC.js
@@ -114,11 +114,13 @@ function listenToKeyboardEvents(ScrollableComponent: React$Component) {
114
}
115
116
componentWillReceiveProps(nextProps: KeyboardAwareHOCProps) {
117
- const keyboardSpace: number = nextProps.viewIsInsideTabBar
118
- ? _KAM_DEFAULT_TAB_BAR_HEIGHT
119
- : 0
120
- if (this.state.keyboardSpace !== keyboardSpace) {
121
- this.setState({ keyboardSpace })
+ if (nextProps.viewIsInsideTabBar !== this.props.viewIsInsideTabBar) {
+ const keyboardSpace: number = nextProps.viewIsInsideTabBar
+ ? _KAM_DEFAULT_TAB_BAR_HEIGHT
+ : 0
+ if (this.state.keyboardSpace !== keyboardSpace) {
122
+ this.setState({ keyboardSpace })
123
+ }
124
125
126
0 commit comments