bug(cdkMenu): menu template context is not updated when cdkMenuTriggerData is changed
- 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
When cdkMenuTriggerData is used to pass additional context to a menu template the template context is not update when the data is changed.
### Reproduction
[GitHub](https://github.com/ghostlytalamaur/angular-cdk-menu-data-bug)
[StackBlitz](https://stackblitz.com/edit/angular-s5r2am-ax9zgm?file=src/main.ts)
Steps to reproduce:
1. Open the application.
2. Click the button "Click Me!". Menu with initial counter value is shown.
3. Click "Increment" button.
4. Click "Click Me!" button second time
### Expected Behavior
Counter value in the context menu should be in sync with the value on the "Click Me!" button.
### Actual Behavior
Counter value in the context menu keep initial value and is not updated when context changes.
### Environment
- Angular: 15.0.0
- CDK/Material: 15.0.2
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện GitHub hoặc StackBlitz được liên kết và theo dõi cách cdkMenuTriggerData đến được template menu của Angular CDK. Tái hiện bộ đếm bị lỗi thời sau khi thay đổi giá trị, sau đó xác minh rằng việc mở lại menu hiển thị giá trị bộ đếm hiện tại và các bài kiểm thử liên quan đều đạ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
- 42/100