Skip to content

@serenity-is/sleekgrid / IGroupItemMetadataProvider

Interface: IGroupItemMetadataProvider

Defined in: src/core/group.ts:10

The metadata hooks of a group item metadata provider, i.e. what a view and a grid need from it to render the rows of a grouping. Implemented by GroupItemMetadataProvider, which is a grid plugin, so the grid and the view can share the same instance.

Methods

getDataRowMetadata()?

optional getDataRowMetadata(row, level, baseMetadata?): ItemMetadata

Defined in: src/core/group.ts:30

Returns the metadata of a data row that is inside a group, e.g. its indentation.

Parameters

row

number

The row index in the view.

level

number

The grouping level of the row.

baseMetadata?

ItemMetadata

The metadata the view has already built for the row, if any.

Returns

ItemMetadata

Metadata for the row, or null when there is none.


getGroupRowMetadata()

getGroupRowMetadata(item): ItemMetadata

Defined in: src/core/group.ts:16

Returns the metadata of the row of a group.

Parameters

item

Group

The group of the row.

Returns

ItemMetadata

Metadata describing how the row should be rendered.


getTotalsRowMetadata()

getTotalsRowMetadata(item): ItemMetadata

Defined in: src/core/group.ts:22

Returns the metadata of the row that shows the totals of a group.

Parameters

item

IGroupTotals

The totals of the row.

Returns

ItemMetadata

Metadata describing how the row should be rendered.