Skip to content

Commit

Permalink
Merge pull request #399 from ert78gb/fix-checkbox-selection
Browse files Browse the repository at this point in the history
fix: checkbox selection state
  • Loading branch information
softsimon authored Mar 15, 2018
2 parents debd4d3 + 6470454 commit 37a68dd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/dropdown/dropdown.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ export class MultiselectDropdownComponent
this.prevModel = this.model;
this.onModelChange(this.model);
this.onModelTouched();
this.cdRef.markForCheck();
}
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -481,7 +486,8 @@ export class MultiselectDropdownComponent
}
this.model = this.model.slice();
this.fireModelChange();
}

}, 0)
}

updateNumSelected() {
Expand Down

0 comments on commit 37a68dd

Please sign in to comment.