I am using Angular material's Drag and Drop module to move some elements.
More concretely, I have multiple cdkDropLists, and one cdkDrag in each of them:
<div *ngFor="let l of lists">
<div cdkDropList [cdkDropListConnectedTo]="all_lists">
<div cdkDrag>
content
</div>
</div>
</div>
I would like to have a placeholder whenever I move an element from my list, like:
<div cdkDrag>
content
<div *cdkDragPlaceholder>
placeholder content
</div>
</div>
However, when I do this, the placeholder content is shown both in place of the missing (currently being dragged) element (source list) as well as in place of its new location (sink list). I would like to be able to keep the default behaviour (showing root element aka content) for the sink list and have the placeholder only for the source list.
I am not able to distinguish the two places though, as it seems even in the "sink" location, it's the sources' elements' HTML is showing (which somewhat makes sense, as placeholder is a property of a cdkDrag and not cdkDropList).
How can I have a different placeholder in place of my element's original location vs the new location?
Stackblitz example.
Intuition: the (multiple) lists are decks of cards, while moving a card from A to B, I see a second-to-top (custom placeholder) card in the A deck, but when I hover the top-A card over B, I see the top-A card there.