WIP - do not display id on list views and correctly format datetime fields

This commit is contained in:
Francisco Gaona
2026-01-26 19:37:17 +01:00
parent ce65817670
commit c7282ee2a0
3 changed files with 34 additions and 4 deletions

View File

@@ -20,6 +20,9 @@ export const useFields = () => {
// Hide system fields and auto-generated fields on edit
const shouldHideOnEdit = isSystemField || isAutoGeneratedField
// Hide 'id' field from list view by default (check both apiName and id field)
const shouldHideOnList = fieldDef.apiName === 'id' || fieldDef.label === 'Id' || fieldDef.label === 'ID'
return {
id: fieldDef.id,
apiName: fieldDef.apiName,
@@ -37,7 +40,7 @@ export const useFields = () => {
validationRules: fieldDef.validationRules || [],
// View options - only hide system and auto-generated fields by default
showOnList: fieldDef.showOnList ?? true,
showOnList: fieldDef.showOnList ?? !shouldHideOnList,
showOnDetail: fieldDef.showOnDetail ?? true,
showOnEdit: fieldDef.showOnEdit ?? !shouldHideOnEdit,
sortable: fieldDef.sortable ?? true,