-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[Table] Remove requirement for a header or data row template #7604
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
Comments
For those giving a thumbs up, can you provide some context in how you'd want to use this? I'm starting to lean towards keeping the API strict (require both |
@andrewseguin maybe tag them since you don't get notifications for reactions? From a strictly high-level view, it does seem strange that to have just data, that you still need to render the row but then hide it with css. I assume it becomes a problem when you define headers for some columns but not others? |
I personally went the
and it works fine on all browsers, I use the paginator so I didn't encounter any problems regarding the scroll bar since well, I don't have one. |
@andrewseguin My use case is a table where the header columns go down the left side, instead of at the top. Example: a two column table of key/value pairs for displaying properties. I don't want a header of ['key', 'value'], just the rows. Sure, adding a |
For my case I'm showing a list of tracking events for a package, eg 'Picked up', 'Delivered' The data simply doesn't need a header that says |
For my case I want to use the same header for two different tables as part of my rows is static data and the other part is inputs. It's a golf scorecard. So I would like to use one table for the static data and another for user input but just have one table header. |
I want to have a key-value table with no header. |
bump |
It would be nice to be able to simply skip rendering some rows. We have two tables using the same DataSource consuming the same data model. Like that we only need to send one request to the backend and maintain only the state of one collection (filters, sorting etc). Caused by Why not simply "skip" rendering a row... Why would that be a problem for the underlying DataSource? It is a simple feature request IMO. Sure they can be hidden with |
@andrewseguin You suggest:
But I would like to refer to this post on Angular WiKi:
|
It's valid that tables may not want any header, or a table could only be a header. Support this use case by letting users avoid defining a
cdk-header-row
orcdk-row
which means that they should not be inserted.Motivation: A table footer row could be a single row composed of a single row without a header. If placed after a preceding table, it acts as a sticky footer. Works well for cases where the header should not affect the rows, e.g. a totals row
Note that this doesn't help in cases where a scrollbar appears on one container but not the other. This will cause misalignment on browsers that push content left to show a scrollbar rather than overlay it (e.g. safari)
The text was updated successfully, but these errors were encountered: