docs-bug(Table): Add example with `rowspan`
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
### 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:
```ts
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 https://github.com/angular/components/issues/11551, which is similar but for the `CdkTable` documentation.
### Affected documentation page
https://material.angular.dev/components/table/examples
贡献指南
调研方向
从受影响的文档页面 https://material.angular.dev/components/table/examples 开始,查看现有的 Table 示例。添加一个使用所提供的 ISOTOPE_DATA 的示例,以演示使用 rowspan 垂直合并单元格,并匹配所展示的 Hydrogen 和 Helium 布局。完成的标准是页面能够清晰地解释并渲染这一用例。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 72/100