Skip to content

BlocksFieldAdminInput

Defined in: packages/core/src/fields/blocks/types.ts:156

Per-type admin input for blocks() — adds defaultCollapsed.

TCollectionSlug extends VexResourceSlug = VexResourceSlug

optional cellAlignment?: Alignment

Defined in: packages/core/src/fields/baseTypes.ts:319

Content alignment in data table cells. ‘left’ | ‘right’ | ‘center’

FieldAdminConfigInput.cellAlignment


optional columnWidth?: number

Defined in: packages/core/src/fields/baseTypes.ts:354

Pixel width of this field’s own column in the list table (Decision 48) — unlike enableSorting/enableHiding, this has no type-based resolution here: the default lives only in resolveListViewColumnConfig’s own FIELD_TYPE_DEFAULT_WIDTH map, consulted when neither this nor the active view’s own column entry (ColumnEntry.width, which always wins) sets one. Named columnWidth, not width, to avoid colliding with this same interface’s own width (the field’s CSS row width in the EDIT form layout) — a different axis entirely.

FieldAdminConfigInput.columnWidth


optional components?: FieldSlotComponentsInput<ComponentHKT>

Defined in: packages/core/src/fields/baseTypes.ts:326

Per-field slot overrides and additive contributions (S1/S6). Omitted entirely for a field with no customization — resolves to {} (every list empty).

Experimental: breaking changes are still possible before this stabilizes.

FieldAdminConfigInput.components


optional defaultCollapsed?: boolean

Defined in: packages/core/src/fields/blocks/types.ts:159


optional enableHiding?: boolean

Defined in: packages/core/src/fields/baseTypes.ts:343

Allow this field’s column to be hidden from the list table via the columns menu. Every column is hideable by default (list-view-overhaul Decision 47, revised) — set false to opt a specific field OUT (e.g. a title/identity column the list should never let a user hide).

Default: true

FieldAdminConfigInput.enableHiding


optional enableSorting?: boolean

Defined in: packages/core/src/fields/baseTypes.ts:334

Allow the list table’s column header for this field to sort the table. The field must lead some declared index (or be defaultView.sort.field) — checked by validateSavedListViewConfig.

Default: false

FieldAdminConfigInput.enableSorting


optional hidden?: boolean

Defined in: packages/core/src/fields/baseTypes.ts:287

Hide this field from the admin form. Hidden fields are still stored in the database.

Default: false

FieldAdminConfigInput.hidden


optional placeholder?: string

Defined in: packages/core/src/fields/baseTypes.ts:315

Placeholder text shown in the input when empty.

FieldAdminConfigInput.placeholder


optional position?: "main" | "sidebar"

Defined in: packages/core/src/fields/baseTypes.ts:303

Position of the field in the form layout.

  • "main" — placed in the main content area
  • "sidebar" — placed in the sidebar panel

Default: "main"

FieldAdminConfigInput.position


optional readOnly?: boolean

Defined in: packages/core/src/fields/baseTypes.ts:294

Make this field read-only in the admin form. The value is displayed but cannot be edited.

Default: false

FieldAdminConfigInput.readOnly


optional width?: string

Defined in: packages/core/src/fields/baseTypes.ts:311

Width of the field within its row, as any CSS width ("50%", "240px"). A row() lays its children out with flex-wrap, sharing a line when their widths allow; below the sm breakpoint every field is full width.

Default: "100%"

FieldAdminConfigInput.width

optional condition(props): boolean

Defined in: packages/core/src/fields/baseTypes.ts:280

Shows the field only while this returns true; a hidden field also skips required and validate(). A condition that throws counts as met.

Declared with method syntax so the parameter is checked bivariantly: a field authored for one collection stays assignable to the generic field unions the admin views hold. To author a condition separately, type it as FieldCondition.

FieldConditionProps<TCollectionSlug>

boolean

FieldAdminConfigInput.condition