Skip to content

Commit

Permalink
Fix children not rendering issue
Browse files Browse the repository at this point in the history
->Fix children not rendering anything after upgrading to RN 0.63.0
->Fix from APSL#429 (comment)
  • Loading branch information
rohitshampur-dev authored Jun 24, 2020
1 parent ff1c79f commit d1a288e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/KeyboardAwareHOC.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,12 +545,15 @@ function KeyboardAwareHOC(
// Allow to pass options, without breaking change, and curried for composition
// listenToKeyboardEvents(ScrollView);
// listenToKeyboardEvents(options)(Comp);
//FIX referencing this issue
//https://github.com/APSL/react-native-keyboard-aware-scroll-view/issues/429#issuecomment-631299411
const listenToKeyboardEvents = (configOrComp: any) => {
if (typeof configOrComp === 'object') {
return (Comp: Function) => KeyboardAwareHOC(Comp, configOrComp)
} else {
return KeyboardAwareHOC(configOrComp)
}
// if (typeof configOrComp === 'object') {
// return (Comp: Function) => KeyboardAwareHOC(Comp, configOrComp)
// } else {
// return KeyboardAwareHOC(configOrComp)
// }
return KeyboardAwareHOC(configOrComp)
}

export default listenToKeyboardEvents

0 comments on commit d1a288e

Please sign in to comment.