@progress/kendo-angular-treelist
Version:
Kendo UI TreeList for Angular - Display hierarchical data in an Angular tree grid view that supports sorting, filtering, paging, and much more.
38 lines (37 loc) • 1.16 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
/**
* Represents a data row with an associated data item.
*/
export interface RowArgs {
/**
* The current row data.
*/
dataItem: any;
/**
* The current row index.
*/
index: number;
}
/**
* Represents the callback arguments used by the [`rowClass`]({% slug api_treelist_treelistcomponent %}#toc-rowClass) property.
*/
export type RowClassArgs = RowArgs;
/**
* Represents the callback used by the [`rowClass`]({% slug api_treelist_treelistcomponent %}#toc-rowClass) property.
*
* ```ts
* public rowCallback({ dataItem, index }) {
* const isEven = index % 2 === 0;
* return {
* even: isEven,
* odd: !isEven
* };
* }
* ```
*/
export type RowClassFn = (context: RowClassArgs) => string | string[] | Set<string> | {
[key: string]: any;
};