Skip to content

Commit

Permalink
fix: directive should only emit, not save on removeModel
Browse files Browse the repository at this point in the history
  • Loading branch information
cormacrelf committed Jul 25, 2018
1 parent dba2dfb commit 59783f0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions modules/ng2-dragula/src/components/dragula.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@ export class DragulaDirective implements OnChanges, OnDestroy {
.dropModel(name)
.subscribe(({ source, target, sourceModel, targetModel }) => {
if (source === this.el.nativeElement) {
// this.dragulaModel = sourceModel;
this.dragulaModelChange.emit(sourceModel);
} else if (target === this.el.nativeElement) {
// this.dragulaModel = targetModel;
this.dragulaModelChange.emit(targetModel);
}
})
Expand All @@ -111,7 +109,6 @@ export class DragulaDirective implements OnChanges, OnDestroy {
.removeModel(name)
.subscribe(({ source, sourceModel }) => {
if (source === this.el.nativeElement) {
this.dragulaModel = sourceModel;
this.dragulaModelChange.emit(sourceModel);
}
})
Expand Down

0 comments on commit 59783f0

Please # to comment.