[ Bug fixed ] - [ Table widget ] showing blank spaces for undefined and null values in the respective cells (#5368)

* bug fixed - shwowing blank spaces for undefined and null values in the respective cells

* removed the condition for string undefined and null edge case
This commit is contained in:
Manish Kushare 2023-01-25 18:02:13 +05:30 committed by GitHub
parent 9274c070f8
commit f3965da73c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ export default function generateColumnsData({
isEditable: column.isEditable,
Cell: function (cell) {
const rowChangeSet = changeSet ? changeSet[cell.row.index] : null;
const cellValue = rowChangeSet ? rowChangeSet[column.name] || cell.value : cell.value;
let cellValue = rowChangeSet ? rowChangeSet[column.name] || cell.value : cell.value;
const rowData = tableData[cell.row.index];
if (
@ -80,6 +80,8 @@ export default function generateColumnsData({
customResolvables[id] = { ...variablesExposedForPreview[id], rowData };
exposeToCodeHinter((prevState) => ({ ...prevState, ...customResolvables }));
}
cellValue = cellValue === undefined || cellValue === null ? '' : cellValue;
switch (columnType) {
case 'string':
case undefined:
@ -158,7 +160,6 @@ export default function generateColumnsData({
const cellStyles = {
color: textColor ?? '',
};
if (column.isEditable) {
const validationData = validateWidget({
validationObject: {