angular / angular/components

bug(tree): Using cdk-tree with ArrayDataSource and synchronous data, the isExpanded functionality can fail.

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

説明

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

Using cdk-tree with ArrayDataSource and synchronous data, the isExpanded functionality can fail.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/2ypkpy-yxnpzh?file=src%2Fexample%2Fcdk-tree-flat-children-accessor-example.ts
Steps to reproduce:
load the page

### Expected Behavior

All nodes automatically expand.

### Actual Behavior

Some nodes did not automatically expand.

### Environment

```
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/

Angular CLI: 18.2.1
Node: 18.20.3
Package Manager: yarn 1.22.19
OS: linux x64

Angular: 18.2.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... localize, material, material-experimental
... material-moment-adapter, platform-browser
... platform-browser-dynamic, router

Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1802.1
@angular-devkit/build-angular 18.2.1
@angular-devkit/core 18.2.1
@angular-devkit/schematics 18.2.1
@angular/cli 18.2.1
@schematics/angular 18.2.1
rxjs 7.4.0
typescript 5.5.4
zone.js 0.14.10
```

- Browser(s): Edge 127.0.2651.105
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

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

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

調査の方向性

StackBlitz の再現環境とその src/example/cdk-tree-flat-children-accessor-example.ts ファイルから始め、ページを読み込んで展開に失敗するノードを確認します。同期的な ArrayDataSource データと isExpanded に対する cdk-tree の動作を追跡します。再現環境ですべてのノードが一貫して展開されれば完了です。

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

評価

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

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

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