-
Notifications
You must be signed in to change notification settings - Fork 359
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
Table/Empty state: the Empty State table from the react demos is breaking on mobile #5379
Comments
* storage: remove table-hover class from empty tables * machines: there needs to be at least one column defined for the table empty state to show up * lib: add css workaround for PF4 broken empty states in tables See patternfly/patternfly-react#5379 Fixes cockpit-project#15213
* storage: remove table-hover class from empty tables * machines: there needs to be at least one column defined for the table empty state to show up * lib: add css workaround for PF4 broken empty states in tables See patternfly/patternfly-react#5379 Fixes #15213
* storage: remove table-hover class from empty tables * machines: there needs to be at least one column defined for the table empty state to show up * lib: add css workaround for PF4 broken empty states in tables See patternfly/patternfly-react#5379 Fixes cockpit-project#15213
What view would you expect for the empty state demo on mobile @KKoukiou @mcarrano? This demo is inconsistent in that other table demos on a mobile size list all columns on the left per row. But I can also see a case for not displaying the columns at all and having the empty state take up 100% of the space for mobile. Table doesn't have a notion of 'empty state' at the moment. It only sees the columns and rows that are passed in, and the empty state is passed as a single item in a row. It only looks like the empty state takes up the whole table space due to styling, and this causes the side-effect currently seen on mobile (because the empty state is only associated with a single column). If columns should be hidden on mobile sizes, the solution would be to conditionally pass in an array containing an empty string ( @nicolethoen Am I thinking through this correctly? |
I have to admit that this is a bit odd. In the Empty state page we have this example that represents better what I would expect: https://www.patternfly.org/v4/components/empty-state#no-match-found So in thins case there are no table headers at all and the table is just replaced with the empty state component. |
Our HTML demo for Table does keep the columns with the empty state, so I'm slightly confused. Do you mean the Table should only show the EmptyState without columns when the screen is small or at all times? https://www.patternfly.org/v4/components/table/html-demos/empty-state/ |
We just need to be able to remove the |
Thanks for the tip @mcoker . I've added this to our roadmap to fix. |
I think we'll need a flag to indicate that a cell is an empty state. That way the table will know to not associate it with a column (the data-label). |
The examples from the docs page looks like this in mobile:
The text was updated successfully, but these errors were encountered: