Skip to content

drag and drop: *cdkDragPreview not working when using an existing component #16013

@ataraciuk

Description

@ataraciuk

What is the expected behavior?

When I set a custom preview with a component, the component is used for the preview.

What is the current behavior?

The component is not showing as the preview. The preview is empty.

What are the steps to reproduce?

Create a drag item, for example.

<div cdkDrag>
  my Item
  <app-room [room]="room" *cdkDragPreview></app-room>
</div>

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

Angular 7
Material: 7.3.6

Is there anything else we should know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions