[CdkTable] expose _insertRow to derived classes
- 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ả
#### Bug, feature request, or proposal: proposal
#### What is the expected behavior?
`_insertRow` is visible to inheriting classes
#### What is the current behavior?
`_insertRow` is private
#### What is the use-case or motivation for changing an existing behavior?
In `_insertRow` the context is created (`RowContext`).
The row context is very useful as a metadata storage for the row, storing information about the row that helps when we want to create features that require state.
For example, flagging if the row is currently being edited, which cell is edited. If the row is being dragged or not etc...
This is also true for a specific cell, metadata for it can be saved on the row context.
#### Is there anything else we should know?
Because `_insertRow` calls `_renderRow`, which is also private, it will require exposing `_renderRow` as well, which is dont think is such a bad thing.
But, if we want to avoid that, maybe it will be better to expose a new protected method, `_createRowContext(data: T): RowContext ` that people can extend
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách đọc các phương thức _insertRow và _renderRow của CdkTable cũng như cách RowContext được tạo. Xác định xem các lớp dẫn xuất nên truy cập các phương thức hiện có hay một điểm truy cập được bảo vệ để tạo context; được xem là hoàn tất khi API được chọn hỗ trợ metadata của hàng cho các lớp dẫn xuất mà không khiến hành vi trở nên mơ hồ.
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ó
- 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
- 35/100