bug(cdkMenu): menu template context is not updated when cdkMenuTriggerData is changed
- 主要言語
- 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
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
コントリビューションガイド
調査の方向性
リンク先の GitHub または StackBlitz の再現例から始め、cdkMenuTriggerData が Angular CDK のメニューテンプレートに到達するまでの流れを追跡します。値を変更した後にカウンターが古いままになる状態を再現し、次にメニューを再度開くと現在のカウンター値が表示され、関連するテストがパスすることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100