-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
featureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Description
Bug, feature request, or proposal:
feature request
What is the expected behavior?
I would like to be able to make drag-drop toggleable. e.g.
<div [cdkDrag]="shouldDragBeEnabled()"></div>
or
<div cdkDrag [cdkDragEnabled]="shouldDragBeEnabled()"></div>
Maybe even for whole cdkDropList
elements, affecting all draggable child elements.
What is the current behavior?
Elements with cdkDrag are always draggable.
What is the use-case or motivation for changing an existing behavior?
We're making an editor for documents and we have draggable components inside this editor. Users can open documents in a read only mode (e.g. when someone else is working on a document) and in this mode the normally draggable elements should not be draggable.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
7.0.0-rc.2
tom-schoener, ryoishizawa, keatkeat87, sgampe and MauroSalvadori
Metadata
Metadata
Assignees
Labels
featureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix