Skip to content

Commit

Permalink
fix: stepper (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
jc9702507 authored Apr 23, 2023
1 parent 5b8754e commit 78ef712
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Stepper/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ Component({
const addTemp = upStep(value, step, precision);
result = Math.min(addTemp, max);
}
const { needUpdate } = this.update(result);
if (this.props.onChange && needUpdate) {
if (!this.isControlled()) {
const { needUpdate } = this.update(result);
if (!needUpdate) {
return;
}
}
if (this.props.onChange) {
this.props.onChange(result, fmtEvent(this.props, e));
}
}
Expand Down

0 comments on commit 78ef712

Please sign in to comment.