Nativebase: Content scrollToEnd is not a function

Created on 30 Aug 2017  路  1Comment  路  Source: GeekyAnts/NativeBase

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>

Most helpful comment

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

>All comments

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

Was this page helpful?
0 / 5 - 0 ratings