Skip to content

bug(cdk/drag-drop): not possible to use custom drag handle with mat table rows #29475

Closed
@chintankavathia

Description

@chintankavathia

Description

CDK Drag and Drop allows to reorder rows within material table however it is not possible to restrict the reordering only using drag handle icon.

Reproduction

StackBlitz link: https://stackblitz.com/edit/vaeujs-yrvig8?file=src%2Fexample%2Fcdk-drag-drop-table-example.html
Steps to reproduce:

  1. Open drag and drop on table rows example from here https://material.angular.io/cdk/drag-drop/examples#cdk-drag-drop-table
  2. Add cdkDragHandle to first cell def mat-icon

Expected Behavior

Row should only be dragged using the icon.

Actual Behavior

Rows can be dragged from anywhere within that row.

Environment

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

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/drag-drop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions