angular / angular/components

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

Đang mở
#29,669 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
area: material/tree needs investigation 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ả

### 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

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

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

Hướng nghiên cứu

Bắt đầu với bản tái hiện trên StackBlitz và tệp src/example/cdk-tree-flat-children-accessor-example.ts của nó, sau đó tải trang để quan sát những node nào không thể mở rộng. Theo dõi hành vi của cdk-tree đối với dữ liệu ArrayDataSource đồng bộ và isExpanded. Hoàn thành khi bản tái hiện luôn mở rộng được tất cả các node.

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
38/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.