We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b06fd5b + b460abc commit 4168db3Copy full SHA for 4168db3
src/TableEditColumn.js
@@ -24,13 +24,15 @@ class TableEditColumn extends Component {
24
25
handleKeyPress = e => {
26
if (e.keyCode === 13 || e.keyCode === 9) {
27
- // Pressed ENTER
+ // Pressed ENTER or TAB
28
const value = e.currentTarget.type === 'checkbox' ?
29
this._getCheckBoxValue(e) : e.currentTarget.value;
30
31
- if (!this.validator(value)) {
+ if ((e.keyCode === 9 && this.props.blurToSave) ||
32
+ (!this.validator(value))) {
33
return;
34
}
35
+
36
if (e.keyCode === 13) {
37
this.props.completeEdit(value, this.props.rowIndex, this.props.colIndex);
38
} else {
0 commit comments