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

component disappears when set position: absolute in content component #1322

Closed
Youjingyu opened this issue Oct 23, 2017 · 2 comments
Closed

Comments

@Youjingyu
Copy link

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>
@akhil-ga akhil-ga added the bug label Oct 25, 2017
@akhil-ga akhil-ga removed the bug label Nov 7, 2017
@akhil-ga
Copy link
Contributor

akhil-ga commented Nov 7, 2017

@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>

@akhil-ga
Copy link
Contributor

Closing the issue due to no response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants