@@ -13,7 +13,7 @@ const _editModeSetter = (params) => {
13
13
} ;
14
14
15
15
const _boolSetter = ( params ) => {
16
- let newValue = params . newValue . toLowerCase ( ) ;
16
+ let newValue = params . newValue ? .toLowerCase ( ) ?? '' ;
17
17
const allowedEmptyField = params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
18
18
if ( ! params . context . editMode ) {
19
19
newValue = params . oldValue ;
@@ -30,7 +30,7 @@ const _boolSetter = (params) => {
30
30
31
31
const _dateSetter = ( params ) => {
32
32
const dateFormat = params . context . dateFormat ;
33
- let newValue = params . newValue ;
33
+ let newValue = params . newValue ?? '' ;
34
34
const allowedEmptyField =
35
35
params . context . editMode && params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
36
36
if ( allowedEmptyField ) {
@@ -55,7 +55,7 @@ const _dateSetter = (params) => {
55
55
} ;
56
56
57
57
const _intSetter = ( params ) => {
58
- let newValue = params . newValue ;
58
+ let newValue = params . newValue ?? '' ;
59
59
const allowedEmptyField =
60
60
params . context . editMode && params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
61
61
if ( ! allowedEmptyField ) {
@@ -80,7 +80,7 @@ const _intSetter = (params) => {
80
80
} ;
81
81
82
82
const _numberSetter = ( params ) => {
83
- let newValue = params . newValue ;
83
+ let newValue = params . newValue ?? '' ;
84
84
const allowedEmptyField =
85
85
params . context . editMode && params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
86
86
if ( ! allowedEmptyField ) {
@@ -108,7 +108,7 @@ const _enumSetter = (params) => {
108
108
if ( enumValues . length === 0 ) {
109
109
console . warn ( `Missing enum values for table column "${ params . column . colId } "` ) ;
110
110
}
111
- let newValue = params . newValue ;
111
+ let newValue = params . newValue ?? '' ;
112
112
const allowedEmptyField = params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
113
113
if ( ! allowedEmptyField && ( ! params . context . editMode || enumValues . indexOf ( newValue ) === - 1 ) ) {
114
114
newValue = params . oldValue ;
0 commit comments