sghiassy / react-native-sglistview

SGListView is a memory minded implementation of React Native's ListView
MIT License
743 stars 72 forks source link

Rest of the cells/rows wont render when using a grid style #42

Open jjdp opened 8 years ago

jjdp commented 8 years ago
<SGListView
  stickyHeaderIndices={[]}
  onEndReached={() => {}}
  onEndReachedThreshold={1}
  pageSize={1}
  initialListSize={10}
  contentContainerStyle={styles.listView}
  dataSource={this.state.dataSource}
  renderRow={this._renderRow}

with this style:

listView: {
    justifyContent: 'flex-start',
    flexDirection: 'row',
    flexWrap: 'wrap',
    paddingTop: 52,
  },

the rest of the rows won't render. In my case the images:

1

adbl commented 7 years ago

I see this too, @jjdp did you find any workaround?

jjdp commented 7 years ago

sadly no. i am just using the default listview for now.

booboothefool commented 7 years ago

Also seeing this issue.

superandrew213 commented 7 years ago

Try this:

  grid: {
    flexDirection: 'row',
    flexWrap: 'wrap',
    alignItems: 'flex-start',
    overflow: 'hidden',
  },

Use alignItems: 'flex-start' instead of justifyContent: 'flex-start'.

booboothefool commented 7 years ago

Thanks @superandrew213. That did the trick for my grid.