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

Tab Height Question #83

Open
mmacfadden opened this issue Sep 29, 2016 · 1 comment
Open

Tab Height Question #83

mmacfadden opened this issue Sep 29, 2016 · 1 comment

Comments

@mmacfadden
Copy link

mmacfadden commented Sep 29, 2016

Nice job on this library, it is very feature rich!

I have a question. It seems like tabs are shown and hidden partially by using the "height" attribute on the div that holds the tab. In my situation, I am using a flex layout, and the tab container is taking up 100% of the vertical width of the page. I am putting a text editor component in the tabs, and the text editor will control the vertical scrolling of the content. Therefore, when the current tab is selected, I need it to take up the remaining space in the layout.

However, it seems like the tab will remove all height attributes when it is shown. This would mean the child component is what would determine the height of the tab. But I need the reverse. I need to tab to take up all extra space in the layout and then set the child to be 100% of the tab.

Is anything like this possible?

I was perhaps thinking that the visibility of the tabs could be controlled with the CSS visibility: hidden / visible attribute rather than setting the height to 0px with an overflow of hidden. I was looking at the containerStyle and hiddenStyle, but am still not sure how those work.

@PeterSchulzNL
Copy link

Try this:

<Tab containerStyle={{height: "100%"}}>
    <YourComponent />
</Tab>

Make sure all your child components have 100% height as well.

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

No branches or pull requests

2 participants