Open abhishekpandeykr opened 6 years ago
@abhishekpandeykr : This worked for me...i used ng2-dnd ! See if it works for you.. There are 2 lists.... you can drag (From names list ) and drop it into second list ( target list). The second list (target list) is sortable too!
<div class="col-sm-5">
<div class="panel panel-success">
<div class="panel-heading">Target List</div>
<div class="panel-body" dnd-droppable (onDropSuccess)="addTo($event)" [dropZones]="['source-dropZone']" >
<ul class="list-group" dnd-sortable-container [sortableData]="listTarget">
<li *ngFor="let target of listTarget; let j = index ; " class="list-group-item" dnd-sortable [sortableIndex]="j" [dragData]="target">
<span >{{target.name}}</span>
</li>
</ul>
</div>
</div>
</div>
addTo($event: any) {
this.listTarget.push($event.dragData);
}
Angular version: 5.2.X
Browser: Chrome XX @vaishnavi-baliga In my case, there is only one list name list, the user can change the ranking of items by dragging the item. Please let me know what I am doing wrong, I have copied the code of simple sortable from ng2-dnd, pasted same code, but it was not giving result.kind of strange.
@abhishekpandeykr : refer this http://embed.plnkr.co/JbG8Si
import {Component} from '@angular/core';
@Component({ selector: 'simple-sortable', template: `
I have tries everything but no luck @vaishnavi-baliga same code is working in Mozilla
I'm submitting a ... [ ] bug report
Do you want to request report a bug?
What is the current behavior?
Its working in mozilla firefox but not in Google chrome
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar.
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Angular version: 2.X.X
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
I am Trying to drag and drop the data in same column , I have tried all the possible answers given in
https://github.com/akserg/ng2-dnd/issues/80
, but i was failed, Please provide the solution for this. I am using version of ng2-dnd is 4.2.0