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

Rendering bug when using sectionHeaders #41

Open
mschipperheyn opened this issue Oct 17, 2016 · 5 comments
Open

Rendering bug when using sectionHeaders #41

mschipperheyn opened this issue Oct 17, 2016 · 5 comments

Comments

@mschipperheyn
Copy link

I have a rendering bug that doesn't occur with the normal ListView. It occurs when I use section Headers.

After some scrolling, the items start overlapping each other. I'm assuming that the trick with emptying out invisible boxes is not taking sections into consideration.

screen shot 2016-10-17 at 17 31 59

screen shot 2016-10-17 at 17 31 48

I call SGListView like so

  <SGListView
      ref="sglist"
      automaticallyAdjustContentInsets={false}
      dataSource={this.state.ds}
      renderRow={renderRow}
      contentContainerStyle={this.props.contentContainerStyle}
      stickyHeaderIndices={[]}
      initialListSize={this.props.initialListSize}
      scrollRenderAheadDistance={1}
      pageSize={12}
      scrollEnabled={scrollEnabled}
      onScroll={onScroll}
      scrollEventThrottle={0}
      onMomentumScrollEnd = {onScrollEnd}
      onEndReached={this.handleLoadMore}
      onEndReachedThreshold={70}
      renderSectionHeader={this.props.renderSectionHeader}
      renderFooter={this.renderFooter}
      contentContainerStyle={[localStyle.container,contentContainerStyle]}
      onLayout={this.setListHeight}
      refreshControl={
        <RefreshControl
          refreshing={showRefresh}
          onRefresh={onRefresh}
        />
      }
  />
@sghiassy
Copy link
Owner

Can you verify that using a regular ListView produces the right UI? Thanks.

@sghiassy
Copy link
Owner

haha... totally missed your first sentence.

So yeah, this seems like a total bug. Many apologies, but I don't know how I'll have time to tackle it in the short-term.

PRs are greatly appreciated.

Cheers,
-- Shaheen

@mschipperheyn
Copy link
Author

mschipperheyn commented Oct 19, 2016

my renderRow method doesn't use sectionId. I'll investigate if this could be the issue. Also, I resort data when new data comes in load-more style. Wonder if this screws with section references somehow.

@vivekguptaraw
Copy link

hi @mschipperheyn , have you found solution for the bug related to section header ?
Please let me know if possible. Thanks

@sghiassy
Copy link
Owner

There was an update to the section headers logic in the newest release. Try updating to version 0.4.3

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