patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
774 stars 352 forks source link

Bug - [Table] - incorrect behavior with visibility breakpoints #11048

Open christianvogt opened 4 days ago

christianvogt commented 4 days ago

Describe the problem When table layout is stacks the cells, I want to show all columns. However at 768px wide, the table layout gets stacked but the column remains hidden due to the visibility according to hiddenOnMd.

How do you reproduce the problem? https://www.patternfly.org/components/table#cell-width-breakpoint-modifiers

This sample uses the following to hide the Pull requests column:

        <Tr>
          <Th width={15}>{columnNames.name}</Th>
          <Th width={15}>{columnNames.branches}</Th>
          <Th width={40} visibility={['hiddenOnMd', 'visibleOnLg']}>
            {columnNames.prs}
          </Th>
          <Th width={15}>{columnNames.workspaces}</Th>
          <Th width={15}>{columnNames.lastCommit}</Th>
        </Tr>

Use the dev tools to adjust the browser width.

Is this issue blocking you? No work around.

Screenshots

769px the column is hidden as expected: image

768px the column is hidden but the layout is also stacked: image

767px the column is visible: image

What is your environment?

What is your product and what release date are you targeting? RHOAI