react-native-parallax-scroll-view icon indicating copy to clipboard operation
react-native-parallax-scroll-view copied to clipboard

ListView initialListSize and pageSize doesn't work

Open aliouchka opened this issue 8 years ago • 4 comments

the listView functions initialListSize and pageSize doesn't work, any idea please ?

aliouchka avatar Jul 04 '16 08:07 aliouchka

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 avatar Sep 15 '16 09:09 sercanov

@sercanov any other solution or any other library you suggest until it get resolved?

waleedarshad-vf avatar Sep 22 '16 09:09 waleedarshad-vf

I am having same issue +1

waleedarshad-vf avatar Sep 22 '16 10:09 waleedarshad-vf

@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) }/>
} />

sercanov avatar Sep 22 '16 10:09 sercanov