import * as React from "react"; /** * @typedef ColumnDefinitionProps * @memberof ColumnDefinition * @property {React.Key} key Identifies the column definition. * @property {Function | React.ReactNode} content Renders cell content. If it's a function, * it receives DataTable row data as the first argument and DataTable context as the second argument. * The render function should return React.ReactNode. * @property {React.ReactNode} header Header content. * @property {string} [headerColSpanKey] Specify the same key for adjacent columns if you want to merge their headers. * @property {string} [name] Column name is used to add custom classes to cells in the column. * @property {React.ReactNode} [subHeader] Subheader content. * @property {Function} [sortingFn] A function that defines sort order. The function should return a negative, zero, or positive value. * It receives data for two rows to sort as arguments. * @property {"asc" | "desc"} [sortDirection] sort * @property {React.CSSProperties} [style] style */ export interface DataTableColumnDefinition { key: React.Key; name?: string; header: ((items: T[], context?: C) => React.ReactNode) | React.ReactNode; headerColSpanKey?: string; subHeader?: React.ReactNode; style?: React.CSSProperties; content: ((item: T, context: C) => React.ReactNode) | React.ReactNode; sortingFn?: (a: T, b: T) => number; description?: string; sortDirection?: "asc" | "desc"; defaultVisible?: boolean; footer?: React.ReactElement | string; } export type ColumnDefinitionElement = Omit>, "key"> & { key: React.Key; };