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
@@ -348,7 +348,7 @@ export const fromPageLayoutWidgetConfigurationToUniversalConfiguration = ({
}
case WidgetConfigurationType.FIELD: {
const { fieldMetadataId, fieldDisplayMode, configurationType } =
const { fieldMetadataId, fieldDisplayMode, configurationType, viewId } =
configuration;
const fieldMetadataUniversalIdentifier =
@@ -358,10 +358,28 @@ export const fromPageLayoutWidgetConfigurationToUniversalConfiguration = ({
shouldThrowOnMissingIdentifier,
});
let viewUniversalIdentifier: string | undefined = undefined;
if (isDefined(viewId)) {
viewUniversalIdentifier =
viewUniversalIdentifierById[viewId] ?? undefined;
if (
!isDefined(viewUniversalIdentifier) &&
shouldThrowOnMissingIdentifier
) {
throw new FlatEntityMapsException(
`View universal identifier not found for id: ${viewId}`,
FlatEntityMapsExceptionCode.RELATION_UNIVERSAL_IDENTIFIER_NOT_FOUND,
);
}
}
return {
configurationType,
fieldMetadataId: fieldMetadataUniversalIdentifier ?? fieldMetadataId,
fieldDisplayMode,
viewId: viewUniversalIdentifier,
};
}