bug(drag-drop): cdkDropListSortPredicate doesn't work if dragging item enter from top
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện StackBlitz được liên kết và kiểm tra hành vi của cdkDropListSortPredicate khi một mục đi vào dropzone Done từ phía trên. Tái hiện trường hợp này trong Angular 19.0.0, sau đó xác minh rằng predicate ngăn mục được thả vào index đầu tiên trong khi vẫn giữ nguyên các hành vi sắp xếp khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100