A tabular UI element with typed rows. Row data is automatically persisted to storage on every change and restored on next run.

interface DataGridWrapper {
    GetValue: () => Record<string, unknown>[];
    SetValue: (rows: Record<string, unknown>[]) => void;
    OnRowAction: (
        callback: (
            rowIndex: number,
            columnKey: string,
            rowData: Record<string, unknown>,
        ) => void,
    ) => void;
    Hide: () => void;
    Show: () => void;
    Destroy: () => void;
    SetText: (text: string) => void;
    SetStyle: (style: Record<string, unknown>) => void;
}

Hierarchy (View Summary)

Properties

GetValue: () => Record<string, unknown>[]

Returns all current rows as an array of plain objects keyed by column key.

SetValue: (rows: Record<string, unknown>[]) => void

Replaces all rows with the provided array. Persists to storage immediately.

OnRowAction: (
    callback: (
        rowIndex: number,
        columnKey: string,
        rowData: Record<string, unknown>,
    ) => void,
) => void

Fires when the user interacts with a button-type column cell.

Hide: () => void

Hides the element without destroying it. Call Show() to make it visible again.

Show: () => void

Makes a previously hidden element visible again.

Destroy: () => void

Permanently removes the element from the UI panel.

SetText: (text: string) => void

Updates the element's display text when the element has a label.

SetStyle: (style: Record<string, unknown>) => void

Merges safe CSS-like renderer style metadata into the element.