UNPKG

1.7 kBTypeScriptView Raw
1import type { IColumn } from './DetailsList.types';
2import type { ICellStyleProps, IDetailsRowStyles } from './DetailsRow.types';
3import type { IDetailsListProps } from './DetailsList';
4import type { IDetailsRowProps } from './DetailsRow';
5/**
6 * Extended column render props.
7 *
8 * {@docCategory DetailsList}
9 */
10export declare type IOverrideColumnRenderProps = Pick<IDetailsListProps, 'onRenderItemColumn' | 'getCellValueKey' | 'onRenderField'> & Pick<IDetailsRowProps, 'cellsByColumn'>;
11/**
12 * Props interface for the DetailsRowFields component.
13 *
14 * {@docCategory DetailsList}
15 */
16export interface IDetailsRowFieldsProps extends IOverrideColumnRenderProps {
17 /**
18 * Data source for this component
19 */
20 item: any;
21 /**
22 * The item index of the collection for the DetailsList
23 */
24 itemIndex: number;
25 /**
26 * Index to start for the column
27 */
28 columnStartIndex: number;
29 /**
30 * Columns metadata
31 */
32 columns: IColumn[];
33 /**
34 * whether to render as a compact field
35 */
36 compact?: boolean;
37 /**
38 * Subset of classnames currently generated in DetailsRow that are used within DetailsRowFields.
39 */
40 rowClassNames: {
41 [k in keyof Pick<IDetailsRowStyles, 'isMultiline' | 'isRowHeader' | 'cell' | 'cellAnimation' | 'cellPadded' | 'cellUnpadded' | 'fields'>]: string;
42 };
43 /**
44 * Whether or not the details row is in a selected state.
45 */
46 isSelected?: boolean;
47 /**
48 * Id for the current row's row-header
49 */
50 rowHeaderId?: string;
51 /**
52 * Style properties to customize cell render output.
53 */
54 cellStyleProps?: ICellStyleProps;
55 enableUpdateAnimations?: boolean;
56}