Kottster Packages API Reference
    Preparing search index...

    Interface TableAction

    interface TableAction {
        color?:
            | DefaultMantineColor
            | (
                (
                    record: TablePageRecord,
                    recordIndex: number,
                ) => DefaultMantineColor | undefined
            );
        label:
            | ReactNode
            | ((record: TablePageRecord, recordIndex: number) => ReactNode);
        onClick?: (record: TablePageRecord, recordIndex: number) => void;
        onResult?: (result: any) => void;
        procedure?: string;
        visible?:
            | boolean
            | ((record: TablePageRecord, recordIndex: number) => boolean);
    }
    Index

    Properties

    color?:
        | DefaultMantineColor
        | (
            (
                record: TablePageRecord,
                recordIndex: number,
            ) => DefaultMantineColor | undefined
        )

    Color of the action button, or a function that returns a color

    label: ReactNode | ((record: TablePageRecord, recordIndex: number) => ReactNode)

    Label of the action button, or a function that returns a label

    onClick?: (record: TablePageRecord, recordIndex: number) => void

    Function to call when the action is clicked

    onResult?: (result: any) => void

    Function to call with the result of the procedure

    procedure?: string

    Procedure to call when the action is clicked

    visible?: boolean | ((record: TablePageRecord, recordIndex: number) => boolean)

    Function to determine if the action should be visible. If omitted, always visible