Content does not stretch to full height
See original GitHub issuereact-native, react and native-base version
"react-native": "0.48.4"
"react": "16.0.0-alpha.12"
"native-base": "2.3.3"
Expected behaviour
Flatlist (horizonatl) present inside the content must stretch to full height.
Actual behaviour
Flatlist wraps the height, without content it used to fill the whole height.
Steps to reproduce (code snippet or screenshot)
<Container style={{ marginTop: 22 }}>
<Header searchBar rounded>
<Item>
<Icon active name='search' />
<Input placeholder='Search' />
</Item>
<Button transparent>
<Text>Search</Text>
</Button>
</Header>
<Content style={{ flex: 1 }}>
<FlatList
data={this.state.items}
renderItem={this.renderRow.bind(this)}
keyExtractor={(item) => item.row._id}
horizontal
removeClippedSubviews={false}
style={{ flex: 1 }}
/>
</Content>
</Container>
Screenshot of emulator/device
Is the bug present in both ios and android or in any one of them?
Issue seen in Both
Any other additional info which would help us debug the issue quicker.
I tried,
- wrapping up Flatlist with nativebase View
- Giving
style={{ flex: 1 }} contentContainerStyle={{ flex: 1 }}
to Content. - Tried giving flex to the items which are being displayed. None of them is working.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Full height div not stretching - html - Stack Overflow
I have just noticed that, on smaller screens, the height of the white background does not stretch past all of the content. Setting...
Read more >height - CSS: Cascading Style Sheets - MDN Web Docs
The height CSS property specifies the height of an element. By default, the property defines the height of the content area.
Read more >Why is height not working?. Parent does not stretch to child's…
If content is fluid, maximum width will reach window width. ... If the content is fluid, height will stretch indefinitely to fit it....
Read more >CSS Height Full Page: CSS gotcha: How to fill page with a div?
What?! It doesn't work! The height still only takes up the content, but not the whole page. The width is good since a...
Read more >CSS- Div- Be Careful When You Size Your Divs
Place both DIVs into a container DIV that's set to 100% of page height and set both interior DIVS to 100%. They will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed it by adding,
contentContainerStyle={{ flexGrow: 1 }}
@SupriyaKalghatgi The property “contentContainerStyle” is not present on the documentation. Is there a plan to deprecate this?