File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 7
7
"type" : " git" ,
8
8
"url" : " https://github.com/wix/react-native-keyboard-aware-scrollview.git"
9
9
},
10
- "version" : " 1.1.6 " ,
10
+ "version" : " 1.1.7 " ,
11
11
"description" : " React Native Keyboard Aware ScrollView - auto adjust content ScrollView" ,
12
12
"nativePackage" : true ,
13
13
"bugs" : {
Original file line number Diff line number Diff line change @@ -78,14 +78,16 @@ export default class KeyboardAwareBase extends Component {
78
78
_scrollToFocusedTextInput ( ) {
79
79
if ( this . props . getTextInputRefs ) {
80
80
const textInputRefs = this . props . getTextInputRefs ( ) ;
81
- textInputRefs . forEach ( ( textInputRef ) => {
82
- if ( textInputRef && textInputRef . isFocused ( ) ) {
81
+ textInputRefs . some ( ( textInputRef , index , array ) => {
82
+ const isFocusedFunc = textInputRef . isFocused ( ) ;
83
+ const isFocused = isFocusedFunc && ( typeof isFocusedFunc === "function" ) ? isFocusedFunc ( ) : isFocusedFunc ;
84
+ if ( isFocused ) {
83
85
setTimeout ( ( ) => {
84
86
this . _keyboardAwareView . getScrollResponder ( ) . scrollResponderScrollNativeHandleToKeyboard (
85
87
ReactNative . findNodeHandle ( textInputRef ) , this . props . scrollToInputAdditionalOffset , true ) ;
86
88
} , 0 ) ;
87
- return ;
88
89
}
90
+ return isFocused ;
89
91
} ) ;
90
92
}
91
93
}
You can’t perform that action at this time.
0 commit comments