MatTreeFlattener does not preserve traversal order while flattening mixed [] and Observable<[]>
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 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