Skip to content

Commit 56cd082

Browse files
committed
feat: submitOnEnter for numeric keypad Enter key (keyCode = 13)
feat: submitOnEnter for numeric keypad Enter key
1 parent 471dddd commit 56cd082

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export default class EdiText extends Component {
4242
}
4343

4444
_handleEnter = e => {
45-
if (e.keyCode === 'Enter' || e.code === 'Enter' || e.keyCode === 27) {
45+
if (e.keyCode === 'Enter' || e.code === 'Enter' || e.keyCode === 27
46+
|| e.keyCode === 13 || e.code === 'NumpadEnter') {
4647
if (this.input.current) this.handleSave()
4748
}
4849
}

0 commit comments

Comments
 (0)