Skip to content

Commit fd3bdaa

Browse files
authored
fix(NumberInput): fix when onHandle return 2 arguments
close #114
1 parent 2b430ed commit fd3bdaa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/NumberInput/NumberInput.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -521,14 +521,14 @@ class NumberInput extends Component {
521521
let downEvents;
522522

523523
upEvents = {
524-
onMouseDown: editable && !upDisabled ? this.up : noop,
525-
onMouseUp: this.stop,
526-
onMouseLeave: this.stop
524+
onMouseDown: e => (editable && !upDisabled ? this.up(e) : noop()),
525+
onMouseUp: e => this.stop(e),
526+
onMouseLeave: e => this.stop(e)
527527
};
528528
downEvents = {
529-
onMouseDown: editable && !downDisabled ? this.down : noop,
530-
onMouseUp: this.stop,
531-
onMouseLeave: this.stop
529+
onMouseDown: e => (editable && !downDisabled ? this.down(e) : noop()),
530+
onMouseUp: e => this.stop(e),
531+
onMouseLeave: e => this.stop(e)
532532
};
533533

534534
return (

0 commit comments

Comments
 (0)