angular / angular/components

cdkDropList events not triggered within a mat-table row

未关闭
#15,949 6 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/drag-drop area: material/table feature P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### What is the expected behavior?
When the table row is set to cdkDropList it should treat cdkDrag items within the row as list items, reordering where necessary and triggering cdkDropListDropped on release

#### What is the current behavior?
mat-header-cells with the cdkDrag property inside a cdkDropList mat-header-row are behaving as if they are normal cdkDrag items without a cdkDropList.

#### What are the steps to reproduce?
https://stackblitz.com/edit/angular-3x3fbt

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
9.1.3

#### Is there anything else we should know?
Similar issue: https://github.com/angular/components/issues/13770

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现开始,检查 cdkDropList 和 cdkDrag 如何在 mat-table 表头行中交互。将其行为与类似的 issue #13770 进行比较,并验证该行是否将其 mat-header-cell 拖动项视为列表项。完成标准是重新排序正常工作,并且在释放时触发 cdkDropListDropped。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。