Drag&Drop Drop List Dynamic Preview
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### What are you trying to do?
I want to be able to change the drag and drop preview depending on which container you're dropping into.
In my stackblitz I have three different containers. The first and third one have regular drag and drop previews, but the second one I'd like to customize the drag and drop preview. Using
```
``` works when dragging elements from the second container, but I'd like the preview to be dynamic depending on where you're dropping it.
For example, if you grab an item from the first container and drag it over the second, I'd like the preview to be the image. But it you drag that same item over the third, it should switch back to the regular preview.
#### What troubleshooting steps have you tried?
I've tried to manually do it using cdkDragDropEntered and cdkDragDropExited events but it did not work as expected. Especially with the differences in the width of the previews.
#### Reproduction
https://stackblitz.com/edit/angular-suzb2h
#### Environment
- Angular: latest
- CDK/Material: latest
- Browser(s): All
- Operating System (e.g. Windows, macOS, Ubuntu): All
Guía de contribución
Línea de trabajo
Comienza con la reproducción vinculada de StackBlitz y el comportamiento de previsualización de arrastrar y soltar de Angular CDK. Revisa cómo se usan cdkDragPreview, cdkDragDropEntered y cdkDragDropExited en la reproducción y, después, determina cómo debería cambiar la previsualización entre los tres contenedores. Se considera terminado cuando la previsualización cambia de forma fiable al entrar y salir de cada contenedor sin un tamaño incorrecto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100