CDKDragAndDrop: Collapse cdkDropList item contents on cdkDragStarted event
- 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ả
### (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
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à tái hiện hành vi xung quanh sự kiện cdkDragStarted trên một cdkDropList. Kiểm tra cách mục đang được kéo và placeholder của danh sách được định kích thước trong khi nội dung của các mục khác bị thu gọn. Công việc được hoàn thành khi việc kéo với nội dung mục bị thu gọn không còn gây ra vấn đề cho placeholder và danh sách trở về trạng thái bình thường sau khi thả.
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ó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 42/100