[Table] Remove requirement for a header or data row template
- 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ả
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` or `cdk-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)
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tìm trong phần triển khai table và các bài kiểm thử của Angular CDK để xem cách xử lý template `cdk-header-row` và `cdk-row`. Xác minh hành vi đối với table không có header, table không có template cho hàng dữ liệu và table chỉ có header; hoàn thành khi các template bị bỏ qua không được chèn vào, trong khi các hàng được hỗ trợ vẫn tiếp tục được render.
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
- frontend
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100