-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[data grid] Add default reset value in row edit mode (#14050)
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com> Co-authored-by: Bilal Shafi <bilalshafidev@gmail.com>
- Loading branch information
1 parent
6f6a7fe
commit d2a3c6c
Showing
4 changed files
with
122 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { GridColDef } from '../../../models/colDef/gridColDef'; | ||
|
||
export const getDefaultCellValue = (colDef: GridColDef) => { | ||
switch (colDef.type) { | ||
case 'boolean': | ||
return false; | ||
case 'date': | ||
case 'dateTime': | ||
case 'number': | ||
return undefined; | ||
case 'singleSelect': | ||
return null; | ||
case 'string': | ||
default: | ||
return ''; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters