docs-bug(Table): Add example with `rowspan`
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ trang tài liệu bị ảnh hưởng, https://material.angular.dev/components/table/examples, và xem lại các ví dụ Table hiện có. Thêm một ví dụ sử dụng ISOTOPE_DATA được cung cấp để minh họa các ô được gộp theo chiều dọc bằng rowspan, khớp với bố cục Hydrogen và Helium được hiển thị. Hoàn tất khi trang giải thích và hiển thị rõ ràng trường hợp sử dụng này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 72/100