Skip to content

cdkDragPreviewContainer not working #23303

@pedrollanes

Description

@pedrollanes

I have put a dialog with a ckdDrag list, but the dragview goes behind the dialog, and I can see that the drag preview is attached to body. I have tried to use cdkDragPreviewContainer ="parent" but it doesn't do anything. So I think that the directive property doesn't work.

<ng-template #dialog>
<div class="container-dialog" >
<div class="column0">
<div class="catalog-panel">
<div class="catalog-items-panel"
cdkDropList
[cdkDropListData]="notAssigned"
(cdkDropListDropped)="dropNotAssigned($event)">
<div class="image-panel" *ngFor="let catalogue of notAssigned" cdkDrag [cdkDragData]="catalogue"
cdkDragPreviewContainer ="parent">
<img class="catalog-image" [src]="catalogue.background" />
</div>
</div>
</div>
</div>
</ng-template

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cdk/drag-dropneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions