Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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