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 = {
1414 enableAutoAutomaticScroll : PropTypes . bool ,
1515 extraHeight : PropTypes . number ,
1616 extraScrollHeight : PropTypes . number ,
17+ enableResetScrollToCoords : PropTypes . bool ,
1718 } ,
1819
1920 getDefaultProps : function ( ) {
2021 return {
2122 enableAutoAutomaticScroll : true ,
2223 extraHeight : _KAM_EXTRA_HEIGHT ,
2324 extraScrollHeight : 0 ,
25+ enableResetScrollToCoords : true ,
2426 }
2527 } ,
2628
@@ -82,7 +84,9 @@ const KeyboardAwareMixin = {
8284 const keyboardSpace : number = ( this . props . viewIsInsideTabBar ) ? _KAM_DEFAULT_TAB_BAR_HEIGHT + this . props . extraScrollHeight : this . props . extraScrollHeight
8385 this . setState ( { keyboardSpace} )
8486 // Reset scroll position after keyboard dismissal
85- if ( this . resetCoords ) {
87+ if ( this . props . enableResetScrollToCoords === false ) {
88+ return
89+ } else if ( this . resetCoords ) {
8690 this . scrollToPosition ( this . resetCoords . x , this . resetCoords . y , true )
8791 } else {
8892 this . scrollToPosition ( this . defaultResetScrollToCoords . x , this . defaultResetScrollToCoords . y , true )
You can’t perform that action at this time.
0 commit comments