Skip to content

Commit 8c3d10d

Browse files
KarlosQÁlvaro Medina Ballester
authored andcommitted
Update KeyboardAwareHOC.js (#354)
1 parent bec5fb9 commit 8c3d10d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/KeyboardAwareHOC.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ function KeyboardAwareHOC(
237237
})
238238
}
239239

240-
componentWillReceiveProps(nextProps: KeyboardAwareHOCProps) {
241-
if (nextProps.viewIsInsideTabBar !== this.props.viewIsInsideTabBar) {
242-
const keyboardSpace: number = nextProps.viewIsInsideTabBar
240+
componentDidUpdate(prevProps: KeyboardAwareHOCProps) {
241+
if (this.props.viewIsInsideTabBar !== prevProps.viewIsInsideTabBar) {
242+
const keyboardSpace: number = this.props.viewIsInsideTabBar
243243
? _KAM_DEFAULT_TAB_BAR_HEIGHT
244244
: 0
245245
if (this.state.keyboardSpace !== keyboardSpace) {

0 commit comments

Comments
 (0)