angular / angular/components

bug(mat-table): Re-orderable sticky columns become un-sticky if you start dragging, abort the drag, and then scroll

Đang mở
#26,384 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/table P4
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

If you create a Material Design Table with **reorderable columns** that are also **sticky**, the column headers become un-sticky if you start to reorder a column, abort, and then scroll.

StackBlitz that reproduces the issue: https://stackblitz.com/edit/angular-kyaurw?file=src/app/table-sticky-header-example.html

### Reproduction

Steps to reproduce:
1. https://stackblitz.com/edit/angular-kyaurw?file=src/app/table-sticky-header-example.html
2. Click and hold a column header and start to drag it, but release the mouse button before dropping it in a new location
3. Scroll down
4. The column header is no longer sticky (see screenshot of the issue)
![unsticky_example](https://user-images.githubusercontent.com/1097608/211224588-af3abd24-95bd-4bbd-96c6-75d94e4bd297.png)

### Expected Behavior

If you abort a drag/drop, the column header should still be sticky like all of the other headers.

### Actual Behavior

If you abort a drag/drop, the column header you clicked is no longer sticky.

### Environment

- Angular: 15.0.4
- CDK/Material: 15.0.4
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows

Hướng dẫn đóng góp

Mở 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à điểm vào src/app/table-sticky-header-example.html của nó. Tái hiện thao tác kéo bị hủy rồi cuộn trong Chrome, sau đó truy vết hành vi của cột sticky và việc sắp xếp lại bảng. Hoàn tất khi thao tác kéo bị hủy không còn khiến header được chọn mất trạng thái sticky.

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
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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.