angular / angular/components

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

オープン
#13,461 コメント 0 件 リアクション 5 件 担当者 0 名 GitHub で見る
area: material/tree G P2
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

src/lib/tree/data-source/flat-data-source.ts のリンクされた MatTreeFlattener.flattenNodes 実装から始め、[] と Observable<[]> の子を混在させた構造のフラット化を再現します。これらの子がどのようにキューに追加されるかを追跡し、フラット化された結果が走査順序を保持していることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。