Skip to content
Data TableAPI Reference

Row detail options

comins-table@0.2.2React

Renders detail content below a row in flat, grouped, or filtered arrays. This is separate from expanding tree nodes and is unavailable in Tree/Viewport. Omit these options to disable details.

Row detail guide

renderRowDetail?: (params: CominsRowDetailParams<TData>) => React.ReactNode;

Returns detail content and enables the feature. params.row.data is the source row.

expandedRowIds?: readonly CominsRowId[];

Defaults to an empty array. Parent-owned expanded row IDs; duplicates are normalized.

onChangeExpandedRowIds?: (rowIds: CominsRowId[]) => void;

Receives the entire next ID array on toggle. Apply it to expandedRowIds. User toggles do nothing without this callback.

isRowExpandable?: (params: CominsRowDetailParams<TData>) => boolean;

Per-row expansion permission. By default, rows with the detail renderer are eligible.

getRowDetailHeight?: (params: CominsRowDetailParams<TData>) => CominsRowDetailHeight;

Returns detail height as a number or auto; defaults to auto. Independent of the data row getRowHeight.

estimatedRowDetailHeight?: number;

Estimate before automatic detail measurement; omission derives it from rowHeight.

export type CominsRowDetailParams<TData> = {
row: CominsEventRow<TData>;
};

row contains source data, ID, display index, and data index.

rowDetail?: {
render?: (params: CominsRowDetailParams<TData>) => React.ReactNode;
};

See the 0.2.2 migration guide for rendering precedence and return values.