File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ const KeyboardAwareMixin = {
14
14
enableAutoAutomaticScroll : PropTypes . bool ,
15
15
extraHeight : PropTypes . number ,
16
16
extraScrollHeight : PropTypes . number ,
17
+ enableResetScrollToCoords : PropTypes . bool ,
17
18
} ,
18
19
19
20
getDefaultProps : function ( ) {
20
21
return {
21
22
enableAutoAutomaticScroll : true ,
22
23
extraHeight : _KAM_EXTRA_HEIGHT ,
23
24
extraScrollHeight : 0 ,
25
+ enableResetScrollToCoords : true ,
24
26
}
25
27
} ,
26
28
@@ -82,7 +84,9 @@ const KeyboardAwareMixin = {
82
84
const keyboardSpace : number = ( this . props . viewIsInsideTabBar ) ? _KAM_DEFAULT_TAB_BAR_HEIGHT + this . props . extraScrollHeight : this . props . extraScrollHeight
83
85
this . setState ( { keyboardSpace} )
84
86
// Reset scroll position after keyboard dismissal
85
- if ( this . resetCoords ) {
87
+ if ( this . props . enableResetScrollToCoords === false ) {
88
+ return
89
+ } else if ( this . resetCoords ) {
86
90
this . scrollToPosition ( this . resetCoords . x , this . resetCoords . y , true )
87
91
} else {
88
92
this . scrollToPosition ( this . defaultResetScrollToCoords . x , this . defaultResetScrollToCoords . y , true )
You can’t perform that action at this time.
0 commit comments