From 59783f0e6be8d74f953db3d2060d8aba2d914cdd Mon Sep 17 00:00:00 2001 From: Cormac Relf Date: Wed, 25 Jul 2018 18:32:52 +1000 Subject: [PATCH] fix: directive should only emit, not save on removeModel --- modules/ng2-dragula/src/components/dragula.directive.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/ng2-dragula/src/components/dragula.directive.ts b/modules/ng2-dragula/src/components/dragula.directive.ts index 4a8fcec7..c65af526 100644 --- a/modules/ng2-dragula/src/components/dragula.directive.ts +++ b/modules/ng2-dragula/src/components/dragula.directive.ts @@ -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); } }) @@ -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); } })