@@ -13,7 +13,7 @@ const _editModeSetter = (params) => {
1313} ;
1414
1515const _boolSetter = ( params ) => {
16- let newValue = params . newValue . toLowerCase ( ) ;
16+ let newValue = params . newValue ? .toLowerCase ( ) ?? '' ;
1717 const allowedEmptyField = params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
1818 if ( ! params . context . editMode ) {
1919 newValue = params . oldValue ;
@@ -30,7 +30,7 @@ const _boolSetter = (params) => {
3030
3131const _dateSetter = ( params ) => {
3232 const dateFormat = params . context . dateFormat ;
33- let newValue = params . newValue ;
33+ let newValue = params . newValue ?? '' ;
3434 const allowedEmptyField =
3535 params . context . editMode && params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
3636 if ( allowedEmptyField ) {
@@ -55,7 +55,7 @@ const _dateSetter = (params) => {
5555} ;
5656
5757const _intSetter = ( params ) => {
58- let newValue = params . newValue ;
58+ let newValue = params . newValue ?? '' ;
5959 const allowedEmptyField =
6060 params . context . editMode && params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
6161 if ( ! allowedEmptyField ) {
@@ -80,7 +80,7 @@ const _intSetter = (params) => {
8080} ;
8181
8282const _numberSetter = ( params ) => {
83- let newValue = params . newValue ;
83+ let newValue = params . newValue ?? '' ;
8484 const allowedEmptyField =
8585 params . context . editMode && params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
8686 if ( ! allowedEmptyField ) {
@@ -108,7 +108,7 @@ const _enumSetter = (params) => {
108108 if ( enumValues . length === 0 ) {
109109 console . warn ( `Missing enum values for table column "${ params . column . colId } "` ) ;
110110 }
111- let newValue = params . newValue ;
111+ let newValue = params . newValue ?? '' ;
112112 const allowedEmptyField = params . colDef . cellEditorParams ?. acceptsEmptyFields && newValue . length === 0 ;
113113 if ( ! allowedEmptyField && ( ! params . context . editMode || enumValues . indexOf ( newValue ) === - 1 ) ) {
114114 newValue = params . oldValue ;
0 commit comments