Skip to content

Commit

Permalink
Fixed #1688 - Add the 'enter' key support to InputNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Nov 26, 2020
1 parent 751d1c8 commit 9119d64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,14 @@ export class InputNumber extends Component {
}
break;

//enter
case 13:
newValueStr = this.validateValue(this.parseValue(inputValue));
this.inputEl.value = this.formatValue(newValueStr);
this.inputEl.setAttribute('aria-valuenow', newValueStr);
this.updateModel(event, newValueStr);
break;

//backspace
case 8:
event.preventDefault();
Expand Down

0 comments on commit 9119d64

Please sign in to comment.