angular / angular/components

feat(cdk/table): Possibility to add custom context to each row cell

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

Currently, the only context passed to the cell is: count, first, last, even, odd. However, this only works properly without pagination. If the table has pagination, we're stuck with these basic variables that are only relative to the page in display and not relative to the whole dataset being used, under the hood.

I'd would suggest giving the possibility to customize this behaviour via an optional method that is called when you run "_updateRowIndexContext". This new optional method would receive the context object that you currently have and expand on it according to what each project requires.

### Use Case

_No response_

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

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

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần triển khai bảng Angular CDK có chứa _updateRowIndexContext và đọc cách context hiện tại cho count, first, last, even và odd được xây dựng. Xác định API tùy chỉnh tùy chọn và bổ sung coverage cho các hàng được phân trang; hoàn thành khi các project có thể mở rộng context bằng các giá trị tương đối với dataset mà không làm hỏng context hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
frontend
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 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

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.