Drag&Drop Drop List Dynamic Preview
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### What are you trying to do?
I want to be able to change the drag and drop preview depending on which container you're dropping into.
In my stackblitz I have three different containers. The first and third one have regular drag and drop previews, but the second one I'd like to customize the drag and drop preview. Using
```
``` works when dragging elements from the second container, but I'd like the preview to be dynamic depending on where you're dropping it.
For example, if you grab an item from the first container and drag it over the second, I'd like the preview to be the image. But it you drag that same item over the third, it should switch back to the regular preview.
#### What troubleshooting steps have you tried?
I've tried to manually do it using cdkDragDropEntered and cdkDragDropExited events but it did not work as expected. Especially with the differences in the width of the previews.
#### Reproduction
https://stackblitz.com/edit/angular-suzb2h
#### Environment
- Angular: latest
- CDK/Material: latest
- Browser(s): All
- Operating System (e.g. Windows, macOS, Ubuntu): All
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現と Angular CDK のドラッグ&ドロッププレビューの動作から始めてください。再現内で cdkDragPreview、cdkDragDropEntered、cdkDragDropExited がどのように使用されているかを確認し、その後、3 つのコンテナー間でプレビューがどのように変わるべきかを判断してください。各コンテナーに入るときと出るときに、サイズが不正確になることなくプレビューが確実に切り替われば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100