Skip to content

docs-bug(Table): Add example with rowspan #33455

Description

@hb20007

Documentation Feedback

There are many useful Table examples in the documentation. However, a common use case that’s missing is how to use rowspan to merge identical cells vertically.

For example, say we have the following data:

const ISOTOPE_DATA: PeriodicElement[] = [
  {position: 1, element: 'Hydrogen', isotope: 'Protium', weight: 1.0078},
  {position: 2, element: 'Hydrogen', isotope: 'Deuterium', weight: 2.0141},
  {position: 3, element: 'Hydrogen', isotope: 'Tritium',  weight: 3.016},
  {position: 4, element: 'Helium', isotope: 'Helium-3', weight: 3.016},
  {position: 5, element: 'Helium', isotope: 'Helium-4', weight: 4.0026},
];

We should be able to use it to create a table like this:

Element Isotope Weight
Hydrogen Protium 1.0078
Deuterium 2.0141
Tritium 3.016
Helium Helium-3 3.016
Helium-4 4.0026

This is related to #11551, which is similar but for the CdkTable documentation.

Affected documentation page

https://material.angular.dev/components/table/examples

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/tabledocsThis issue is related to documentationgemini-triagedLabel noting that an issue has been triaged by gemini

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions