Skip to content

Commit

Permalink
fix: always clear selected value on writeValue (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao authored Mar 13, 2018
1 parent b8b4acf commit 8edea5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ng-select/ng-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ export class NgSelectComponent implements OnDestroy, OnChanges, AfterViewInit, C
}

writeValue(value: any | any[]): void {
this.itemsList.clearSelected();
if (value === undefined) {
return;
}
this.itemsList.clearSelected();
this._validateWriteValue(value);
this._handleWriteValue(value);
this.detectChanges();
Expand Down

0 comments on commit 8edea5a

Please sign in to comment.