Drag Drop: disable shifting on target droplist and enable replacing
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Feature Description
Looking at multiple droplists enable to drag one item from droplist 1 to droplist 2. After dropping item 1 on item 2, switch position instead of shifting all items to the next position.
#### Use Case
What we now did is just added this to every droplist:
` (cdkDropListDropped)="drop($event, indexRow)"`
In this 'drop' function we made 2 situations, either `transferArrayItem()` or `moveItemInArray()`
This just moves the items inside the droplist or moves them from one droplist to another. This all works. The downside is though, while you are dragging an item from droplist 1 to droplist 2, you see all the items in droplist 2 shifting a position to the right (When horizontal orientated). While our code says in the background to just switch places.
After the code is done, the shifted items all go back to their original places.
コントリビューションガイド
調査の方向性
issue にはファイルもテストも記載されていません。まず、ここで説明されている Angular CDK のドラッグ&ドロップリストの動作と cdkDropListDropped callback を追跡します。完了条件は、リスト間のドロップによって隣接するアイテムを移動させずに、対象アイテムが見た目上置き換えられることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100