react-native-parallax-scroll-view
react-native-parallax-scroll-view copied to clipboard
ListView initialListSize and pageSize doesn't work
the listView functions initialListSize and pageSize doesn't work, any idea please ?
Yes, I have the same issue. But I don't know if it's related to here or react native.
The code below renders only 3 rows. I think it's related to scroll handler, listview seems cannot get the bottom scroll offset.
<ListView
ref="ListView"
initialListSize={1}
pageSize={1}
dataSource={ this.state.dataSource }
renderRow={this._renderRow}
renderScrollComponent={
<ParallaxScrollView
fadeOutForeground={false}
parallaxHeaderHeight={height}
contentBackgroundColor={Colors.darkGray}
renderBackground={this._renderParallaxBackground.bind(this) }
renderForeground={() => (
<MovieInsight movieInfo={this.state.info.movie} artistsInfo={this.state.info.artists}/>
) }/>
} />
facebook/react-native#8467
@sercanov any other solution or any other library you suggest until it get resolved?
I am having same issue +1
@waleedarshad-vf it's the only library meet my requirements so I'm stuck with it.
I was having performance issues because of heavy rendering so I decided to an UI workaround in renderRow
function and right now I'm OK but if you have much more rows to render, you should need to make it work with initalListSize
and pageSize
Could you try the code below, I don't remember if it was working or not
<ListView
ref="ListView"
initialListSize={1}
pageSize={1}
dataSource={ this.state.dataSource }
renderRow={this._renderRow}
renderScrollComponent={ props =>
<ParallaxScrollView
{...props}
fadeOutForeground={false}
parallaxHeaderHeight={height}
contentBackgroundColor={Colors.darkGray}
renderBackground={this._renderParallaxBackground.bind(this) }
renderForeground={this._renderParallaxForeground.bind(this) }/>
} />