Merge pull request #1754 from payloadcms/fix/#1752

fix: #1752, removes label from row field type
This commit is contained in:
James Mikrut
2022-12-23 10:51:48 -05:00
committed by GitHub
7 changed files with 11 additions and 11 deletions

View File

@@ -39,7 +39,7 @@ const DefaultCell: React.FC<Props> = (props) => {
if (!CellComponent) {
return (
<WrapElement {...wrapElementProps}>
{(cellData === '' || typeof cellData === 'undefined') && t('noLabel', { label: getTranslation(typeof field.label === 'function' ? 'data' : field.label || 'data', i18n) })}
{((cellData === '' || typeof cellData === 'undefined') && 'label' in field) && t('noLabel', { label: getTranslation(typeof field.label === 'function' ? 'data' : field.label || 'data', i18n) })}
{typeof cellData === 'string' && cellData}
{typeof cellData === 'number' && cellData}
{typeof cellData === 'object' && JSON.stringify(cellData)}