Skip to content

Commit

Permalink
fix(module: stepper): fixed stepper disabled bug (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
sWhite01111 authored and fisherspy committed Apr 30, 2019
1 parent 1db49eb commit acb2a95
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions components/stepper/stepper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,12 @@ export class Stepper implements OnChanges, ControlValueAccessor {
}

ngOnChanges() {
if (this.plus(this._value, this._step) > this._max) {
this._upDisabled = true;
}
if (this.minus(this._value, this._step) < this._min) {
if (this._disabled) {
this._downDisabled = true;
this._upDisabled = true;
} else {
this._upDisabled = this.plus(this._value, this._step) > this._max ? true : false;
this._downDisabled = this.minus(this._value, this._step) < this._min ? true : false;
}
this.setCls();
}
Expand Down

0 comments on commit acb2a95

Please sign in to comment.