diff --git a/packages/frontend-core/src/components/grid/lib/utils.js b/packages/frontend-core/src/components/grid/lib/utils.js index 1988b66cc2..fb062cb1fa 100644 --- a/packages/frontend-core/src/components/grid/lib/utils.js +++ b/packages/frontend-core/src/components/grid/lib/utils.js @@ -19,6 +19,10 @@ export const getCellID = (rowId, fieldName) => { } export const getColumnIcon = column => { + if (column.schema.icon) { + return column.schema.icon + } + if (column.schema.autocolumn) { return "MagicWand" } diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index 246922678d..45004a861d 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -337,6 +337,14 @@ export async function enrichSchema( type: relTableField.type, subtype: relTableField.subtype, } + if ( + !enrichedFieldSchema.icon && + relTableField.type === FieldType.BB_REFERENCE && + relTableField.subtype === BBReferenceFieldSubType.USER && + !helpers.schema.isDeprecatedSingleUserColumn(relTableField) + ) { + // Forcing the icon, otherwise we would need to pass the constraints to show the proper icon + enrichedFieldSchema.icon = "UserGroup" } result[relTableFieldName] = enrichedFieldSchema }