bug(drag-drop): cdkDropListSortingDisabled interacts badly with connected lists
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Reproduction
This is a fork of the "disable sorting" example from the docs.
https://stackblitz.com/edit/angular-lcgpvd?file=src/app/cdk-drag-drop-disabled-sorting-example.ts
Steps to reproduce:
1. Open example
2. Drag an item from one list to another
#### Expected Behavior
One of the following, internally-consistent behaviors:
* the receiving list provides some way of determining where the incoming item will be sorted
* the incoming item always goes before the first item
* the incoming item always goes after the last item
#### Actual Behavior
The incoming item gets a placeholder wherever the user drags it, but then can't be moved. The user can continue dragging back to the original list, so the placeholder goes back to the original position then drag over the target list again to put the placeholder in a new position -- but again, can't move the placeholder directly.
#### Environment
- Angular: 12.2.9
- CDK/Material: 12.2.9
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Win10
#### Comments
I'd like to see the first behavior implemented -- let me supply a sort-function that gets the dragged item's `data` (and maybe the index in its current container?) as an input and outputs the list index at which the placeholder should be inserted. Failing that, I'd at least like a property that lets me say that, since sorting is disabled, the placeholder should go at the "start" or "end".
コントリビューションガイド
調査の方向性
src/app/cdk-drag-drop-disabled-sorting-example.ts にあるリンク先の StackBlitz の例から始め、ソートを無効にした状態で接続されたリスト間のドラッグを再現します。次に、プレースホルダーを配置する CDK drag-drop の接続リストの動作を追跡します。受け取り側のリストの一貫した動作を 1 つ選択して実装し、報告された再現ケースをカバーできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100