apex-grid
    Preparing search index...

    Interface BaseColumnConfiguration<T, K>

    Configuration object for grid columns.

    interface BaseColumnConfiguration<T extends object, K extends Keys<T> = Keys<T>> {
        alt?: string;
        badgeVariant?:
            | BadgeVariant
            | ((value: BasePropertyType<T, K>) => BadgeVariant);
        cellTemplate?: (params: ApexCellContext<T, K>) => unknown;
        currency?: string;
        editable?: boolean;
        editorTemplate?: (params: ApexEditorContext<T, K>) => unknown;
        exportable?: boolean;
        filter?: boolean | ColumnFilterConfiguration;
        format?: ColumnDateFormat;
        headerTemplate?: (params: ApexHeaderContext<T>) => unknown;
        headerText?: string;
        hidden?: boolean;
        key: K;
        locale?: string;
        max?: number;
        options?: ColumnSelectOption<BasePropertyType<T, K>>[];
        pinned?: PinPosition;
        reorderable?: boolean;
        resizable?: boolean;
        shape?: "square" | "circle";
        showDelta?: boolean;
        sort?: boolean | ColumnSortConfiguration<T, K>;
        statusVariant?:
            | StatusVariant
            | ((value: BasePropertyType<T, K>) => StatusVariant);
        type?: DataType;
        width?: string;
    }

    Type Parameters

    Index

    Properties

    alt?: string

    Alt text for <img> elements rendered by type: 'image' columns.

    Defaults to the column key. Has no effect on columns with another type.

    badgeVariant?: BadgeVariant | ((value: BasePropertyType<T, K>) => BadgeVariant)

    Visual variant for type: 'badge' columns. A literal applies to every cell; a callback picks per value. Defaults to 'neutral'. Has no effect on columns with another type.

    cellTemplate?: (params: ApexCellContext<T, K>) => unknown

    Cell template callback.

    currency?: string

    ISO 4217 currency code for type: 'currency' columns (e.g. 'USD', 'EUR'). Defaults to 'USD'. Has no effect on columns with another type.

    editable?: boolean

    Whether values in this column can be edited inline.

    Has no effect unless the grid's editing.enabled is true. The default editor is chosen from the column's type ('string' → text input, 'number' → number input, 'boolean' → checkbox). Supply BaseColumnConfiguration.editorTemplate for full control.

    editorTemplate?: (params: ApexEditorContext<T, K>) => unknown

    Custom editor template invoked while this column's cell is in edit mode.

    The callback receives an ApexEditorContext that includes the cell value plus commit / cancel helpers. Returning a focusable element is recommended so keyboard handoff works.

    exportable?: boolean

    Whether this column is included when exporting via ApexGrid.exportToCSV (or the enterprise grid's XLSX export).

    Defaults to true. Set to false to omit a column from generated files (useful for action columns, derived UI, or sensitive fields). The grid-rendered selection checkbox column is never exported regardless of this flag.

    filter?: boolean | ColumnFilterConfiguration

    Whether filter operation can be applied on the column or not.

    format?: ColumnDateFormat

    Display format for columns with type: 'date'.

    Selects an Intl.DateTimeFormatOptions.dateStyle preset. Defaults to 'medium'. Has no effect on columns with another type.

    headerTemplate?: (params: ApexHeaderContext<T>) => unknown

    Header template callback.

    headerText?: string

    Optional text to display in the column header. By default, the column key is used to render the header text.

    hidden?: boolean

    Whether the column is hidden or not.

    key: K

    The field for from the data the this column will reference.

    locale?: string

    BCP 47 locale for type: 'currency' number formatting. Defaults to the runtime locale. Has no effect on columns with another type.

    max?: number

    Upper bound for type: 'rating' and type: 'progress'.

    For 'rating' this is the star count (default 5); the displayed value is clamped to [0, max]. For 'progress' this is the value that fills the bar to 100% (default 100). Has no effect on columns with another type.

    options?: ColumnSelectOption<BasePropertyType<T, K>>[]

    Option list for columns with type: 'select'.

    Each entry is either a bare value or an explicit { value, label } pair. The cell renders the matching option's label in display mode and a native <select> of all options in edit mode. Has no effect on columns with another type.

    pinned?: PinPosition

    Pin the column to a side of the grid.

    Pinned columns stay fixed during horizontal scroll. Use 'start' (left in LTR, right in RTL) for the leading edge or 'end' for the trailing edge. The grid renders columns in the order: 'start'-pinned, unpinned, 'end'-pinned, while preserving the original array order inside each group. The columns array itself is not mutated.

    reorderable?: boolean

    Whether this column can be reordered via drag-and-drop or the ApexGrid.moveColumn API.

    Has no effect unless the grid's columnReordering flag is true. When unset, columns inherit the grid-wide flag. Reordering is constrained to the column's own pinning group — start-pinned columns can only swap with other start-pinned columns, and likewise for end-pinned and unpinned.

    resizable?: boolean

    Whether the the column can be resized or not.

    shape?: "square" | "circle"

    Cropping shape for columns with type: 'image'.

    'square' (default) renders the image at its native aspect. 'circle' crops to a circle (useful for avatars). Has no effect on columns with another type.

    showDelta?: boolean

    Whether type: 'sparkline' columns render a trailing delta-% label. Defaults to true. Has no effect on columns with another type.

    sort?: boolean | ColumnSortConfiguration<T, K>

    Whether the column can be sorted or not.

    statusVariant?:
        | StatusVariant
        | ((value: BasePropertyType<T, K>) => StatusVariant)

    State for type: 'status' columns. A literal applies to every cell; a callback maps a value to a state. When omitted the state is inferred from the value text. Has no effect on columns with another type.

    type?: DataType

    The type of data this column will reference.

    Affects the default filter operands if the column is with filtering enabled.

    If not passed, string is assumed to be the default type.

    width?: string

    Width for the current column.

    Accepts most CSS units for controlling width.

    If not passed, the column will try to size itself based on the number of other columns and the total width of the grid.