angular / angular/components

feat(Mat-Table): Allow for adding multiple TBODY within Mat-Table

Đang mở
#28,195 1 bình luận 5 reaction 0 người được giao Xem trên GitHub
area: cdk/table feature P3
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ả

### Feature Description

In the current cdk Table implementation we can only have on `` with a `matRowDef`. This will generate a TBODY element with the TR's inside.
That works fine for most use case.

I would like to be able to add a second TBODY with a selection of the rows of the datasource (based on a filter) so that I have 2 groups of rows within the same table.

I tried using the When option in matRowDef but that doesn't result in 2 TBODY's, but it comes close into what I am looking for.

### Use Case

I am having a list of Categories of which the top 3 can have primary flag. Those are display at the top, then row 4 until X is the non primary Categories.
I enabled drag and drop and I only want to be able to order the Primary rows within their TBODY and the non-primary rows in their TBODY. So you can't accidentally drop a Non primary row into a primary block.

You can control if a category is primary or not by editing the Category itself.

So to sum up feature request:

- Allow for multiple TBODYs which can have a filtered collection of the datasource
- Allow Drag and drop within that tbody only
image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với phần triển khai CDK Table và tùy chọn matRowDef When để hiểu cách TBODY đơn hiện tại được tạo ra. Xác định cách nhiều nhóm datasource đã được lọc cần được render và cách thao tác kéo và thả phải vẫn nằm trong từng TBODY; được xem là hoàn thành khi cả hai hành vi đều hoạt động đối với các nhóm danh mục chính và không chính được mô tả.

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ó
5/5
Thời gian dự kiến
Hơn một tuần
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
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.