angular / angular/components

MatTreeFlattener does not preserve traversal order while flattening mixed [] and Observable<[]>

Đang mở
#13,461 0 bình luận 5 reaction 0 người được giao Xem trên GitHub
area: material/tree G P2
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ả

When `MatTreeFlattener` `flattenNodes` method is used to flatten a data structure that mixes use of `[]` and `Observable<[]>`, the resulting flattened nodes are out of order as the children found from `Observable<[]>` are not done syncronously, but instead are done in order of discovery as they are each sent into the microtask queue to be done. They are sent in the correct order however to the task queue.

It appears the code in question is here:
https://github.com/angular/material2/blob/da63c6f85005966b42864a6c10f60896c8362361/src/lib/tree/data-source/flat-data-source.ts#L62-L68

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

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

Hướng nghiên cứu

Bắt đầu trong src/lib/tree/data-source/flat-data-source.ts, tại phần triển khai MatTreeFlattener.flattenNodes được liên kết, và tái hiện việc làm phẳng một cấu trúc trộn [] với các phần tử con Observable<[]>. Theo dõi cách các phần tử con đó được đưa vào hàng đợi và xác minh rằng kết quả được làm phẳng vẫn giữ nguyên thứ tự duyệ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
Lỗi
Độ 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
35/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.