Interface ExpandedOptions<Data>

Type interface for expanded rows options.

Type Parameters

Hierarchy

Custom Component Properties

collapsedIndicator?: ReactNode

Indicator for collapsed row.

Default

expandedIndicator?: ReactNode

Indicator for expanded row.

Default

Other Properties

autoResetExpanded?: boolean

Reset expanded rows when data changes.

Default

true

expandSubRows?: boolean

Expanded rows are rendered like normal rows.

Default

true

getSubRows?: ((rowData: Data, relativeIndex: number) => Data[])

Type declaration

    • (rowData: Data, relativeIndex: number): Data[]
    • Custom method to extract sub-rows from a given row.

      Parameters

      • rowData: Data
      • relativeIndex: number

      Returns Data[]

initialState?: Partial<UseExpandedState<Data>>

Initial settings of expanded rows.

manualExpandedKey?: IdType<Data>

This string is used as the key to detect manual expanded state on any given row.

Default

"expanded"

The row with ('expanded': true) will always be expanded.

onStateChange?: StateChangeHandler<UseExpandedState<Data>>

Callback executed when rows are expanded or collapsed. The function must be wrapped in useCallback hook.

paginateExpandedRows?: boolean

Count expanded sub-rows while calculating rows on a page.

Default

true

Generated using TypeDoc