angular / angular/components

Drag Drop: disable shifting on target droplist and enable replacing

Offen
#16,153 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area: cdk/drag-drop feature P4
Vorherrschende Sprache
TypeScript
Sterne
25k
Forks
6.8k
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
91

Beschreibung

#### 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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

In der Issue wird keine Datei und kein Test genannt. Beginne damit, das hier beschriebene Verhalten von Angular CDK-Drag-and-drop-Listen und den cdkDropListDropped-Callback nachzuverfolgen; fertig ist es, wenn Drops zwischen Listen das Zielelement sichtbar ersetzen, ohne benachbarte Elemente zu verschieben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.