@@ -28,9 +28,8 @@ class TableEditColumn extends Component {
28
28
const value = e . currentTarget . type === 'checkbox' ?
29
29
this . _getCheckBoxValue ( e ) : e . currentTarget . value ;
30
30
31
- // TAB triggers blur so no need to notify
32
- const notify = e . keyCode !== 9 || ! this . props . blurToSave ;
33
- if ( ! this . validator ( value , notify ) ) {
31
+ if ( ( e . keyCode === 9 && this . props . blurToSave ) ||
32
+ ( ! this . validator ( value ) ) ) {
34
33
return ;
35
34
}
36
35
@@ -75,18 +74,18 @@ class TableEditColumn extends Component {
75
74
76
75
// modified by iuculanop
77
76
// BEGIN
78
- validator ( value , notify = true ) {
77
+ validator ( value ) {
79
78
const ts = this ;
80
79
let valid = true ;
81
80
if ( ts . props . editable . validator ) {
82
81
const checkVal = ts . props . editable . validator ( value , this . props . row ) ;
83
82
const responseType = typeof checkVal ;
84
83
if ( responseType !== 'object' && checkVal !== true ) {
85
84
valid = false ;
86
- notify && this . notifyToastr ( 'error' , checkVal , '' ) ;
85
+ this . notifyToastr ( 'error' , checkVal , '' ) ;
87
86
} else if ( responseType === 'object' && checkVal . isValid !== true ) {
88
87
valid = false ;
89
- notify && this . notifyToastr ( checkVal . notification . type ,
88
+ this . notifyToastr ( checkVal . notification . type ,
90
89
checkVal . notification . msg ,
91
90
checkVal . notification . title ) ;
92
91
}
0 commit comments