Skip to content

Commit

Permalink
fix(module:select): fix select reset bug in form (#153)
Browse files Browse the repository at this point in the history
close #128
  • Loading branch information
vthinkxie authored Aug 25, 2017
1 parent b442863 commit 2bf24e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/select/nz-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,11 @@ export class NzSelectComponent implements OnInit, AfterContentInit, AfterContent
if (this._value === value) {
return;
}
this._value = value;
if ((value === null) && this.nzMultiple) {
this._value = [];
} else {
this._value = value;
}
if (!this.nzMultiple) {
if (value === null) {
this._selectedOption = null;
Expand All @@ -506,6 +510,8 @@ export class NzSelectComponent implements OnInit, AfterContentInit, AfterContent
} else {
this.updateSelectedOption(value, true);
}
} else if (value === null) {
this.clearAllSelectedOption();
}

}
Expand Down

0 comments on commit 2bf24e0

Please sign in to comment.