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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: material/tabledocsThis issue is related to documentationgemini-triagedLabel noting that an issue has been triaged by geminineeds triageThis issue needs to be triaged by the team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions