Closed dlabrecq closed 5 years ago
Try updating the gridBreakPoint
to grid-xl
.
I see .pf-m-grid-xl
in the HTML and it now breaks at 1200px. However, I still see the issue between 1200px and 1260px.
@mcoker Can you take another look at this to see if the 1200px and 1260px issues should be fixed in core?
@dlabaj I believe this has to do with the width of the data in the cost management table. @dlabrecq we have since added grid-2xl
as an option for gridBreakPoint
, which will break the table to the grid layout at 450px
. Will that work?
@dlabrecq did you try the grid-2xl breakpoint? is this still an issue for you
I still see the issue when the window is resized between 1000px and 600px.
Are we expected to wrap the PF4 table component in a grid (i.e., isn't the table responsive itself)?
Note that I'm able to reproduce the issue with the PF 4 examples. This screenshot was less than 800px.
@dlabrecq it's up to the user to apply the correct grid breakpoint in their table to tell the table when to wrap. In the case above, the <th>
content is causing the table to overflow its container since <th>
doesn't/shouldn't wrap by default. We should either increase the grid breakpoint or shorten the <th>
content.
There is also a .pf-m-wrap
modifier you can use on the <th>
cells to allow them to wrap, but in the case above I think we should do one of the options above.
@mcoker Are you speaking about applying a modifier to the raw HTML from PF-core or the React table component?
I don't see any React table examples showing how to apply the .pf-m-wrap
modifier or how to apply a grid-2xl
break point. At least, I don't see how the React table component exposes the <th>
cells directly?
It's possible that the React table component needs to be adjusted? I just don't see a way for end users to do it, unless you can point me to an example?
@dlabrecq on https://patternfly-react.surge.sh/patternfly-4/components/table/ look for the "Table with headers that wrap" example. And the breakpoints are defined in the gridBreakPoint
prop. For a 2xl breakpoint you would define gridBreakPoint="grid-2xl"
@mcoker Thank you for clarifying. The gridBreakPoint="grid-2xl" seems to be working.
When we resize the browser window for the CostManagement UI, the table items resize to some extent, but eventually gets out of sync with the browser.
It appears that the table remains a minimum size, until the window reaches a certain point. Then, the table changes its responsive layout for a very small window.
Screenshots
See: https://github.com/project-koku/koku-ui/issues/767