Skip to content

Commit

Permalink
fix: always clear selected value on writeValue
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao committed Mar 13, 2018
1 parent b8b4acf commit e7bc898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ng-select/ng-select.component.ts
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 e7bc898

Please sign in to comment.