Skip to content

Commit

Permalink
fix: respect max and min when using arrows (#4563)
Browse files Browse the repository at this point in the history
  • Loading branch information
rudolpho1 authored and asudoh committed Dec 5, 2019
1 parent 963499e commit 2b22855
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/components/NumberInput/NumberInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class NumberInput extends Component {

if (!disabled && conditional) {
value = direction === 'down' ? value - step : value + step;
value = capMax(max, capMin(min, value));
evt.persist();
evt.imaginaryTarget = this._inputRef;
this.setState(
Expand Down

0 comments on commit 2b22855

Please sign in to comment.