I am trying to follow this: ListView grid in React Native but with renderHeader() as well. When I have both renderHeader() and renderRow() with the
contentContainerStyle={{flexDirection: 'row', flexWrap: 'wrap'}}
, the whole ListView is affected, shifts left, and the renderRow() disappears.
But when I take out the renderHeader(), it creates the grid of renderRow() perfectly without any issues. So how can I go about using ListView's contentContainerStyle only to affect renderHeader() to create the grid, and also have renderHeader() as well?
return (
<View style={{flex: 1}}>
<ListView
contentContainerStyle={{flexDirection: 'row', flexWrap: 'wrap'}}
dataSource={this.state.dataSource}
renderRow={this.renderRow.bind(this)}
renderHeader={this.renderHeader.bind(this)}
/>
</View>
);
Thank you in advance!