111*_*110 8 react-native react-native-scrollview
I have a scrollview which content is larger than phone screen.
I scroll to the bottom and there I have function that reload content of that scrollview but first clear data source for it.
Reload function is connected to RefreshControl on scrollview.
But RefreshControl is not visible while loading data except when I slightly touch screen where content should be.
And this is only when I start reload from scrollview bottom.
I tried to scroll to top but it doesn't solve it:
onContentSizeChange={(contentWidth, contentHeight) => {
this.scrollView.scrollTo({ y: 0 });
}}
Run Code Online (Sandbox Code Playgroud)
Any idea why this is happening?
<ScrollView
ref={ref => (this.scrollView = ref)}
refreshControl={
<RefreshControl
refreshing={this.props.getDataInProgress}
onRefresh={this.reloadData.bind(this)}
/>
}
>
{this.renderData()}
renderData() {
return this.props.data.map((item, index) => {
return ... some function that return other components
Run Code Online (Sandbox Code Playgroud)
So as I wrote if I pull down loader is visible. But if I scroll to bottom and click one some button that call same function as pull to refresh loader is not visible. EXAMPLE
| 归档时间: |
|
| 查看次数: |
177 次 |
| 最近记录: |