Tabs should easily support filling the full height of the parent container #5458
Replies: 0 comments 10 replies
-
cc @mcoker |
Beta Was this translation helpful? Give feedback.
-
@christianvogt in this case, I think the stack layout would work well. The stack layout uses Would something like that work? |
Beta Was this translation helpful? Give feedback.
-
@mcoker I didn't realize that There's a lot of boilerplate needed here to get this layout. I think it would be useful to developers if PF would support this. |
Beta Was this translation helpful? Give feedback.
-
I just raised an issue for uncontrolled support: patternfly/patternfly-react#4458 |
Beta Was this translation helpful? Give feedback.
-
@christianvogt sorry for the delay. Would a variation to fill the available height work? Like all things that fill height using CSS, it would require the parent have an implicit or explicit height, but it could apply |
Beta Was this translation helpful? Give feedback.
-
First thing that comes to mind for ease of use would be to support a structure like this. I understand that the current So perhaps another variant that simplifies to this markup. It can more easily support uncontrolled variant as well.
|
Beta Was this translation helpful? Give feedback.
-
Hey @christianvogt sorry for the delay, just wanted to check in and say I've still got this on my radar and will try and review what this could look like in our current milestone and get back to you. |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Beta Was this translation helpful? Give feedback.
-
From @christianvogt:
|
Beta Was this translation helpful? Give feedback.
-
Describe the issue. What is the expected and unexpected behavior?
There is no way to use the
Tabs
react component and achieve a layout where the tab content extends the full height of the container. The tab content will only size to its contents or the dev needs to add some external css, targeting the inner components, to make it work.The
Tabs
component renders the tabs header and the tab content as siblings with no parent node managing the layout between the header and content. To achieve a layout where the tab content expands to fill the available height of the container, we need to place a flex layout in the parent and setflex-grow: 1
on the tab content. This isn't intuitive to a consumer of the react component where the user will expect to simply use a prop (egfullHeight
), setheight: 100%
or setflex-grow: 1
and expect the entire tab component to fill the available space.Please provide the steps to reproduce. Feel free to link CodeSandbox or another tool.
In this codesandbox, the 2nd tab shows the desired behavior where a
https://codesandbox.io/s/autumn-darkness-bor1n
Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around?
Enhancement.
Workaround is to hack the CSS of the react component to achieve the desired layout.
Beta Was this translation helpful? Give feedback.
All reactions