Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set a renderSeparator? #15

Open
webliupeng opened this issue Feb 3, 2016 · 3 comments
Open

Can't set a renderSeparator? #15

webliupeng opened this issue Feb 3, 2016 · 3 comments

Comments

@webliupeng
Copy link

I set property renderSeparator. it will return a separator .When I scrolling down first separator out screen.the second cell will gone.
how can I resolve this problem? thx a lot.

<SGListView
                removeClippedSubviews={true}
                renderSeparator={(s,i)=><View style={{backgroundColor:"rgb(240, 240, 240)", height:10}} key={i}></View>}
                dataSource={this.state.dataSource}
                renderRow={this.renderRow}
                initialListSize={3}
                pageSize={10}
                scrollRenderAheadDistance={1}
                renderFooter={this.renderFooter}
                automaticallyAdjustContentInsets={true}
                onEndReachedThreshold={20}
                onEndReached={this.onEnd}
                onChangeVisibleRows={this.onChangeVisibleRows}

                refreshControl={
                    <RefreshControl
                        refreshing={this.state.isRefreshing}
                        onRefresh={this._loadData}
                        tintColor="rgb(100, 100, 100)"
                        title="加载..."
                        colors={['#ff0000', '#00ff00', '#0000ff']}
                        progressBackgroundColor="#ffff00"
                    />
                    }
                />
@sghiassy
Copy link
Owner

sghiassy commented Feb 3, 2016

The props for SGListView are transferred directly to the underlying React-Native ListView. Are you sure your separator works with a regular ListView element?

@webliupeng
Copy link
Author

Yes,I'm sure separator works fine with ListView

@rturk
Copy link

rturk commented Jun 15, 2016

@webliupeng as quick workaround instead of a renderSeparator you can use topMargin in each of your cels. That's what I use in my apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants