mithril-materialized
    Preparing search index...

    Interface DataTableSelection<T>

    Configuration for DataTable row selection functionality

    interface DataTableSelection<T = Record<string, any>> {
        getRowKey: (row: T, index: number) => string;
        mode: "none" | "single" | "multiple";
        onSelectionChange?: (selectedKeys: string[], selectedRows: T[]) => void;
        selectedKeys: string[];
    }

    Type Parameters

    • T = Record<string, any>

      The type of the data object for each row

    Index

    Properties

    getRowKey: (row: T, index: number) => string

    Function to generate a unique key for each row

    mode: "none" | "single" | "multiple"

    Selection mode - controls how many rows can be selected

    onSelectionChange?: (selectedKeys: string[], selectedRows: T[]) => void

    Callback invoked when row selection changes

    selectedKeys: string[]

    Array of currently selected row keys