Skip to content

Commit

Permalink
fix: always clear selected value on writeValue (ng-select#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao authored Mar 13, 2018
1 parent 4a71732 commit cc3f323
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 cc3f323

Please sign in to comment.