Skip to content

Commit

Permalink
feat(multiplelists): avoid cross dropping
Browse files Browse the repository at this point in the history
  • Loading branch information
nivekcode committed Apr 10, 2019
1 parent 2ab53d2 commit df3d109
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/ng-sortgrid/src/lib/ng-sortgrid-item.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export class NgSortgridItemDirective implements OnInit, AfterViewInit {

@HostListener('drop', ['$event'])
drop(): void {
const elementGroup = this.ngsgStore.getSelecteditems(this.ngSortGridGroup);
if (elementGroup.length === 0) {
return;
}
const element = event.target as Element;
this.sortService.endSort(element);
const reflectedChanges = this.reflectService.reflectChanges(this.ngSortGridGroup, element);
Expand Down

0 comments on commit df3d109

Please sign in to comment.