bug(drag-drop): cdkDropListSortPredicate doesn't work if dragging item enter from top
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
`cdkDropListSortPredicate` doesn't work in certain senarios
### Reproduction
StackBlitz link: https://stackblitz.com/edit/z6ffpx7e-wg8uidxw?file=src%2Fexample%2Fcdk-drag-drop-connected-sorting-group-example.html
Steps to reproduce:
1. Open StackBlitz reproduction link
2. The code has `cdkDropListSortPredicate` applied to "Done" dropzone, the intention is preventing item being dragged to the first index
3. Drag item from "To do" zone and enter "Done" zone from top

### Expected Behavior
Item cannot be dragged & dropped to the first index in "Done"
### Actual Behavior
Item can be dragged & dropped to the first index in "Done"
### Environment
- Angular: 19.0.0
- CDK/Material: 19.0.0
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
コントリビューションガイド
調査の方向性
リンクされた StackBlitz の再現例から始め、アイテムが上から Done ドロップゾーンに入ったときの cdkDropListSortPredicate の動作を調査します。Angular 19.0.0 でこのケースを再現し、その後、predicate によってアイテムが最初のインデックスにドロップされるのを防ぎつつ、他のソート動作が維持されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100