From 647045439b068153e6e4c26268db3f6cc04398d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ro=CC=81bert=20Kiss?= Date: Thu, 15 Mar 2018 16:07:47 +0100 Subject: [PATCH] fix: checkbox selection --- src/dropdown/dropdown.component.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dropdown/dropdown.component.ts b/src/dropdown/dropdown.component.ts index 96dc7fd8..efabf0c5 100644 --- a/src/dropdown/dropdown.component.ts +++ b/src/dropdown/dropdown.component.ts @@ -301,6 +301,7 @@ export class MultiselectDropdownComponent this.prevModel = this.model; this.onModelChange(this.model); this.onModelTouched(); + this.cdRef.markForCheck(); } } @@ -395,7 +396,11 @@ export class MultiselectDropdownComponent return; } - if (!this.disabledSelection) { + if (this.disabledSelection) { + return; + } + + setTimeout(()=>{ this.maybeStopPropagation(_event); this.maybePreventDefault(_event); const index = this.model.indexOf(option.id); @@ -481,7 +486,8 @@ export class MultiselectDropdownComponent } this.model = this.model.slice(); this.fireModelChange(); - } + + }, 0) } updateNumSelected() {