Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions lib/KeyboardAwareHOC.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function KeyboardAwareHOC(
return;
}
const { keyboardSpace, keyboardEndCoordinatesScreenY } = this.state;
const currentlyFocusedField = TextInput.State.currentlyFocusedField()
const currentlyFocusedField = findNodeHandle(TextInput.State.currentlyFocusedInput())
const responder = this.getScrollResponder()
if (!currentlyFocusedField || !responder ) {
return
Expand Down Expand Up @@ -784,7 +784,7 @@ function KeyboardAwareHOC(
// listenToKeyboardEvents(ScrollView);
// listenToKeyboardEvents(options)(Comp);
const listenToKeyboardEvents = (configOrComp: any) => {
if (typeof configOrComp === 'object') {
if (typeof configOrComp === 'object' && !configOrComp.displayName) {
return (Comp: Function) => KeyboardAwareHOC(Comp, configOrComp)
} else {
return KeyboardAwareHOC(configOrComp)
Expand Down