Drag Drop: disable shifting on target droplist and enable replacing
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Aucun fichier ni test n’est mentionné dans l’issue. Commencez par suivre le comportement des listes de glisser-déposer de Angular CDK et le callback cdkDropListDropped décrits ici ; c’est terminé lorsque les drops entre listes remplacent visiblement l’élément cible sans décaler les éléments voisins.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100