angular / angular/components

Drag Drop: disable shifting on target droplist and enable replacing

Abierto
#16,153 6 comentarios 0 reacciones 0 asignados Ver en GitHub
area: cdk/drag-drop feature P4
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

#### Feature Description

Looking at multiple droplists enable to drag one item from droplist 1 to droplist 2. After dropping item 1 on item 2, switch position instead of shifting all items to the next position.

#### Use Case

What we now did is just added this to every droplist:
` (cdkDropListDropped)="drop($event, indexRow)"`

In this 'drop' function we made 2 situations, either `transferArrayItem()` or `moveItemInArray()`

This just moves the items inside the droplist or moves them from one droplist to another. This all works. The downside is though, while you are dragging an item from droplist 1 to droplist 2, you see all the items in droplist 2 shifting a position to the right (When horizontal orientated). While our code says in the background to just switch places.
After the code is done, the shifted items all go back to their original places.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

En el issue no se menciona ningún archivo ni ninguna prueba. Empieza por rastrear el comportamiento de las listas de arrastrar y soltar de Angular CDK y el callback cdkDropListDropped descrito aquí; se considerará terminado cuando los drops entre listas reemplacen visiblemente el elemento de destino sin desplazar los elementos vecinos.

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
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.