Kottster Packages API Reference
    Preparing search index...

    Interface TableColumn

    interface TableColumn {
        column: string;
        fieldInput?: FieldInput;
        fieldRequirement?: string;
        filterable?: boolean;
        formFieldPosition?: number;
        formFieldSpan?: string;
        hiddenInForm?: boolean;
        hiddenInTable?: boolean;
        label?: string;
        position?: number;
        prefix?: string;
        relationshipKey?: string;
        relationshipPreviewColumns?: string[];
        render?: (
            record: TablePageRecord,
            recordIndex: number,
            data: { records: TablePageRecord[]; total: number },
        ) => any;
        searchable?: boolean;
        sortable?: boolean;
        suffix?: string;
        width?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    column: string

    Column name in the database table or any other unique identifier

    fieldInput?: FieldInput

    Field input configuration for the form field

    fieldRequirement?: string

    Validation rule for the column

    filterable?: boolean

    Whether the column is filterable

    formFieldPosition?: number

    Position of the field in the form

    formFieldSpan?: string

    Grid field span for the field in the form (12, 8, 6, 4)

    hiddenInForm?: boolean

    Whether the column is hidden in the form

    false
    
    hiddenInTable?: boolean

    Whether the column is hidden in the table

    false
    
    label?: string

    Display name for the column

    position?: number

    Position of the column in the table

    prefix?: string

    Prefix for the column value (goes before the value)

    relationshipKey?: string
    relationshipPreviewColumns?: string[]

    If the column is a foreign key, this specifies the column in the related table to be displayed as the label

    render?: (
        record: TablePageRecord,
        recordIndex: number,
        data: { records: TablePageRecord[]; total: number },
    ) => any

    Client-side custom render function for the column

    Type Declaration

      • (
            record: TablePageRecord,
            recordIndex: number,
            data: { records: TablePageRecord[]; total: number },
        ): any
      • Parameters

        • record: TablePageRecord

          The record object containing all columns

        • recordIndex: number

          The index of the record in the current page

        • data: { records: TablePageRecord[]; total: number }

          Additional data including all records and total count

        Returns any

        The rendered React element or content for the column

    render: (record) => <span>{record.first_name} {record.last_name}</span>
    
    searchable?: boolean

    Whether the column is searchable

    sortable?: boolean

    Whether the column is sortable

    suffix?: string

    Suffix for the column value (goes after the value)

    width?: number

    Client-side custom width for the column