NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Content scrollToEnd is not a function

Open shivenj opened this issue 9 years ago • 1 comments

react-native : 0.47.2 native-base : 2.3.1

Platform: Android

Expected behaviour: Content should also scrollToEnd.

Actual Behaviour: Undefined is not a function

I suppose Content replaces scrollview in native base. so all the methods which apply to scrollview should also apply to Content. but when i call scrollToEnd method on content it says Undefined is not a function. here is the code i'm using:

<Content ref={ref => this.content = ref}
                onContentSizeChange={(contentWidth, contentHeight)=>{        
                    this.content.scrollToEnd({animated: true});
                }}>     
                  {_.map(renderedSteps, this.renderStep)}
          </Content>

shivenj avatar Aug 30 '17 07:08 shivenj

@shivenj use this.content._root.scrollToEnd({animated: true})

shivrajkumar avatar Sep 11 '17 07:09 shivrajkumar