CDKDragAndDrop: Collapse cdkDropList item contents on cdkDragStarted event
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### (Marked as troubleshooting since I wasn't sure if there was a known solution for this case)
#### What are you trying to do?
Collapse/hide the contents of all items in a cdkDropList upon starting a drag event, leaving a condensed view of labels that is easier to sort.
#### What troubleshooting steps have you tried?
When starting the drag event, all items collapse except for the item currently being dragged, causing issues in the list placeholder when attempting to drop an item. Once the drop event is complete, the dropped item collapses and the list returns to normal.
#### Reproduction
StackBlitz: https://stackblitz.com/edit/components-issue-bt4kvt?file=app%2Fapp.component.ts
Steps to reproduce:
1. Set up a cdkDropList with items that contain a title and collapsible content panel.
2. Set the cdkDragStarted event for the list items to collapse all of the content panels.
3. Make sure all items in the list are expanded.
4. Begin dragging one of the items.
#### Environment
- Angular: 8.2.0
- CDK/Material: 8.2.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現から始め、cdkDropList 上の cdkDragStarted イベント周辺の動作を再現します。他の項目の内容が折りたたまれる間、ドラッグされた項目とリストのプレースホルダーがどのようなサイズになるかを調査します。項目の内容が折りたたまれた状態でドラッグしてもプレースホルダーの問題が発生せず、ドロップ後にリストが通常の状態に戻れば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100