feat(CdkMenu/CdkContextMenuTriggerFor): Allow CdkMenu to be programmatically opened/closed
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
## Feature Description
### Current Behaviour
The directive `CdkMenu` is used with combination of `CdkContextMenuTriggerFor`. When user right-clicks (context-menu event), the menu gets opened and clicking on outside of the menu will close the menu.
### New Feature Requested
It would be great if user can manually/programmatically open/close the menu. And also disable closing the menu clicking outside.
#### Possible Solutions
1. Add a boolean input property `cdkContextMenuDisableCloseOnOutsideClick` - This will disable closing the `CdkMenu` on outside click
2. Add an event emitter property `cdkContextMenuTriggered` - This will emit everytime user right-clicks (context-menu event) with the coordinates
3. Add an event emitter property `cdkContextMenuClickedOutside` - This will emit everytime user clicks outside of the `CdkMenu`
### Use Case
This will allow users to handle animations with `CdkMenu` if they want to apply on open/close.
コントリビューションガイド
調査の方向性
まず、CdkMenu と CdkContextMenuTriggerFor directive のエントリポイントを読み、既存のコンテキストメニューのオープン動作と外側クリック時のクローズ動作を追跡します。プログラムによるオープン/クローズ、外側クリックによるクローズの無効化、コンテキストメニュー/外側クリックの通知について、public API とイベントのセマンティクスを明確にします。合意した動作が実装され、関連するメニューテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100