Nativebase: component disappears when set position: absolute in content component

Created on 23 Oct 2017  路  2Comments  路  Source: GeekyAnts/NativeBase

react-native, react and native-base version

react-native : 0.48.4
react : 16.0.0-alpha.12
native-base : 2.3.3

Expected behaviour

component is visible when set position: absolute

Actual behaviour

component disappears

Steps to reproduce (code snippet or screenshot)

my code is:

<Content>
    <Button style={{ position: 'absolute' }}><Text>Click</Text></Button>
</Content>

the button is not visible in my android device. i think the reason is that the height of Content is 0 or zIndex, so i set the height and zIndex, but it is still not visible.
if i use Container to wrap Button, it is visible:

<Container>
    <Button style={{ position: 'absolute' }}><Text>Click</Text></Button>
</Container>
awaiting response

Most helpful comment

@Youjingyu you can fix this by giving a minHeight to <Content/>.
Like

 <Content contentContainerStyle={{ minHeight: 100 }}>
       <Button style={{ position: "absolute" }}>
            <Text>Click</Text>
       </Button>
 </Content>

All 2 comments

@Youjingyu you can fix this by giving a minHeight to <Content/>.
Like

 <Content contentContainerStyle={{ minHeight: 100 }}>
       <Button style={{ position: "absolute" }}>
            <Text>Click</Text>
       </Button>
 </Content>

Closing the issue due to no response

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bsiddiqui picture bsiddiqui  路  3Comments

Bundas picture Bundas  路  3Comments

natashache picture natashache  路  3Comments

natashache picture natashache  路  3Comments

kitsune7 picture kitsune7  路  3Comments