angular / angular/components

bug(drag-drop): cdkDropListSortingDisabled interacts badly with connected lists

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

Descripción

#### Reproduction

This is a fork of the "disable sorting" example from the docs.

https://stackblitz.com/edit/angular-lcgpvd?file=src/app/cdk-drag-drop-disabled-sorting-example.ts

Steps to reproduce:
1. Open example
2. Drag an item from one list to another


#### Expected Behavior

One of the following, internally-consistent behaviors:

* the receiving list provides some way of determining where the incoming item will be sorted
* the incoming item always goes before the first item
* the incoming item always goes after the last item

#### Actual Behavior

The incoming item gets a placeholder wherever the user drags it, but then can't be moved. The user can continue dragging back to the original list, so the placeholder goes back to the original position then drag over the target list again to put the placeholder in a new position -- but again, can't move the placeholder directly.

#### Environment

- Angular: 12.2.9
- CDK/Material: 12.2.9
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Win10

#### Comments

I'd like to see the first behavior implemented -- let me supply a sort-function that gets the dragged item's `data` (and maybe the index in its current container?) as an input and outputs the list index at which the placeholder should be inserted. Failing that, I'd at least like a property that lets me say that, since sorting is disabled, the placeholder should go at the "start" or "end".

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con el ejemplo vinculado de StackBlitz en src/app/cdk-drag-drop-disabled-sorting-example.ts y reproduce el arrastre entre listas conectadas con la ordenación deshabilitada. Después, sigue el comportamiento de CDK drag-drop de las listas conectadas que coloca el marcador de posición. Se considera terminado cuando se haya elegido e implementado un comportamiento coherente para la lista receptora, con cobertura para la reproducción informada.

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
Error
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.