Use backspace for clearing record table cell. (#4299)

* Use backspace for clearing record table cell.
This commit is contained in:
Lucas Bordeau
2024-03-11 15:19:28 +01:00
committed by GitHub
parent a5b41e09f5
commit e26572b408
5 changed files with 97 additions and 7 deletions

View File

@ -17,14 +17,12 @@ export const generateEmptyFieldValue = (
return {
label: '',
url: '',
__typename: 'Link',
};
}
case FieldMetadataType.FullName: {
return {
firstName: '',
lastName: '',
__typename: 'FullName',
};
}
case FieldMetadataType.DateTime: {
@ -43,6 +41,8 @@ export const generateEmptyFieldValue = (
return true;
}
case FieldMetadataType.Relation: {
// TODO: refactor with relationDefiniton once the PR is merged : https://github.com/twentyhq/twenty/pull/4378
// so we can directly check the relation type from this field point of view.
if (
!isNonEmptyString(
fieldMetadataItem.fromRelationMetadata?.toObjectMetadata
@ -63,7 +63,6 @@ export const generateEmptyFieldValue = (
return {
amountMicros: null,
currencyCode: null,
__typename: 'Currency',
};
}
case FieldMetadataType.Select: {