Skip to content

Commit

Permalink
fix(MTableRow): dont override enter on button elements
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Obermaier committed May 28, 2021
1 parent 999f4d4 commit 5387af4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/MTableEditRow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ function MTableEditRow(props) {
}

const handleKeyDown = (e) => {
if (e.keyCode === 13 && e.target.type !== 'textarea') {
if (
e.keyCode === 13 &&
e.target.type !== 'textarea' &&
e.target.type !== 'button'
) {
handleSave();
} else if (e.keyCode === 13 && e.target.type === 'textarea' && e.shiftKey) {
handleSave();
Expand Down

0 comments on commit 5387af4

Please sign in to comment.