Add a Table display mode to relation field widgets (#20929)

## Context

Adds a new Table layout to the FIELD widget for to-many relation fields.
On a record page, a relation can now be displayed as a full record table
(the same component used for record indexes and dashboard table widgets)
scoped to the records related to the current record.



https://github.com/user-attachments/assets/320b24dc-f019-4d0e-bc71-3e64d032d75a



https://github.com/user-attachments/assets/2f6d4f8e-de26-4fc1-ae12-c9b9c19654dc



https://github.com/user-attachments/assets/3fb6d512-f83c-4818-823e-46ad2644fbc2
This commit is contained in:
Weiko
2026-05-27 14:13:58 +02:00
committed by GitHub
parent fc3004b2f6
commit 2f358a1775
47 changed files with 695 additions and 158 deletions
@@ -1,6 +1,13 @@
import { Field, ObjectType } from '@nestjs/graphql';
import { IsEnum, IsIn, IsNotEmpty, IsString } from 'class-validator';
import {
IsEnum,
IsIn,
IsNotEmpty,
IsOptional,
IsString,
IsUUID,
} from 'class-validator';
import { type FieldConfiguration } from 'twenty-shared/types';
@@ -23,4 +30,9 @@ export class FieldConfigurationDTO implements FieldConfiguration {
@IsEnum(FieldDisplayMode)
@IsNotEmpty()
fieldDisplayMode: FieldDisplayMode;
@Field(() => String, { nullable: true })
@IsOptional()
@IsUUID()
viewId?: string;
}
@@ -5,6 +5,7 @@ export enum FieldDisplayMode {
EDITOR = 'EDITOR',
FIELD = 'FIELD',
VIEW = 'VIEW',
TABLE = 'TABLE',
}
registerEnumType(FieldDisplayMode, {