@serenity-is/corelib / TreeGridMixin
A mixin that can be applied to a DataGrid for tree functionality
• TItem
new TreeGridMixin<
TItem
>(options
):TreeGridMixin
<TItem
>
TreeGridMixinOptions
<TItem
>
TreeGridMixin
<TItem
>
src/ui/datagrid/treegridmixin.ts:14
collapseAll():
void
void
src/ui/datagrid/treegridmixin.ts:66
expandAll():
void
void
src/ui/datagrid/treegridmixin.ts:71
toggleAll():
void
Expands / collapses all rows in a grid automatically
void
src/ui/datagrid/treegridmixin.ts:59
static
applyTreeOrdering<TItem
>(items
,getId
,getParentId
):TItem
[]
Reorders a set of items so that parents comes before their children. This method is required for proper tree ordering, as it is not so easy to perform with SQL.
• TItem
TItem
[]
list of items to be ordered
(item
) => any
a delegate to get ID of a record (must return same ID with grid identity field)
(item
) => any
a delegate to get parent ID of a record
TItem
[]