Skip to content

Commit

Permalink
fix(module:input-number): properly display zero value (#1003)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz authored and wilsoncook committed Feb 4, 2018
1 parent 3dbd308 commit d562525
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/input-number/nz-input-number.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ export class NzInputNumberComponent implements ControlValueAccessor {
private _updateValue(value: number, emitChange: boolean = true): void {
const cacheValue = this._value;
this._value = this._getBoundValue(value);
this._displayValue = this.nzFormatter(this._value || '');
this._inputNumber.nativeElement.value = this.nzFormatter(this._value || '');
this._displayValue = this.nzFormatter(this._isNumber(this._value) ? this._value : '');
this._inputNumber.nativeElement.value = this._displayValue;
if (emitChange && (value !== cacheValue)) {
this.onChange(this._value);
}
Expand Down

0 comments on commit d562525

Please sign in to comment.