1
I’m trying to get a list of Firebase items, including images, that will be rendered in a Listview.
But the problem is that when Listview gets bigger than the screen, then Refreshcontrol no longer works.
Working, with a full list "inside" the screen
Not working, if pulled appears this effect of "limit"
Render method
<View contentContainerStyle={{ flex: 1 }}>
<ListView
enableEmptySections
dataSource={this.dataSource}
renderRow={this.renderRow}
refreshControl={
<RefreshControl
refreshing={this.state.refreshing}
onRefresh={this.onRefresh.bind(this)}
/>
}
/>
</View>
onRefresh() {
this.setState({ refreshing: true });
this.props.eventsFetch();
}
I even tried using FlatList but it won’t even be like that.
in this video the guy uses Refresh in a Listview, see if you can do something similar: https://www.youtube.com/watch?v=ScaXi00HRg0
– Samuel Rizzon
tried to put a
style={{flex:1}}in hisListView?– Neuber Oliveira
Another detail
contentContainerStyleis a prop ofListViewtherefore this proposal inViewwill have no effect.– Neuber Oliveira
I tried to put
style={{ flex: 1 }}in myListViewbut it didn’t help. I tried to take thecontentContainerStyleand put in theListViewalso, it didn’t work– Weslley Rocha
Have you tried using the
ScrollViewin place?– Mateus
Already, and of the same problem, I managed using a snapshot of firebase, when there is change, shows a button to do the refresh
– Weslley Rocha