/**----------------------------------------------------------------------------------------- * 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 | { [key: string]: any; };