diff --git a/components/lib/datatable/datatable.d.ts b/components/lib/datatable/datatable.d.ts index 1adc7c2459..d61823334f 100644 --- a/components/lib/datatable/datatable.d.ts +++ b/components/lib/datatable/datatable.d.ts @@ -125,8 +125,8 @@ interface DataTablePFSEvent extends DataTablePageParams, DataTableSortParams, Da [key: string]: any; } -interface DataTableDataSelectableParams { - data: any; +interface DataTableDataSelectableParams { + data: DataTableRowDataArray; index: number; } @@ -144,7 +144,7 @@ interface DataTableSelectAllChangeParams { interface DataTableRowEventParams { originalEvent: React.SyntheticEvent; - data: any; + data: DataTableValue; } interface DataTableRowMouseEventParams extends Omit { @@ -154,11 +154,11 @@ interface DataTableRowMouseEventParams extends Omit { originalEvent: React.MouseEvent; value: any; field: string; - rowData: DataTableValue; + rowData: DataTableRowData; rowIndex: number; cellIndex: number; selected: boolean; @@ -186,10 +186,10 @@ interface DataTableSelectParams { interface DataTableUnselectParams extends DataTableSelectParams {} -interface DataTableExportFunctionParams { - data: DataTableValueArray; +interface DataTableExportFunctionParams { + data: DataTableRowDataArray; field: string; - rowData: DataTableValue; + rowData: DataTableRowData; column: Column; } @@ -200,9 +200,9 @@ interface DataTableColReorderParams { columns: React.ReactElement; } -interface DataTableRowReorderParams { +interface DataTableRowReorderParams { originalEvent: React.DragEvent; - value: any; + value: DataTableRowDataArray; dragIndex: number; dropIndex: number; } @@ -292,7 +292,7 @@ export interface DataTableProps extends Omit first?: number; footer?: DataTableFooterTemplateType; footerColumnGroup?: React.ReactNode; - frozenValue?: DataTableRowData[]; + frozenValue?: DataTableRowDataArray; frozenWidth?: string; globalFilter?: DataTableGlobalFilterType; globalFilterFields?: string[]; @@ -352,11 +352,11 @@ export interface DataTableProps extends Omit cellClassName?(value: any, options: DataTableCellClassNameOptions): object | string; customRestoreState?(): object; customSaveState?(state: object): void; - exportFunction?(e: DataTableExportFunctionParams): any; - isDataSelectable?(e: DataTableDataSelectableParams): boolean | undefined | null; + exportFunction?(e: DataTableExportFunctionParams): any; + isDataSelectable?(e: DataTableDataSelectableParams): boolean | undefined | null; onAllRowsSelect?(e: DataTableSelectParams): void; onAllRowsUnselect?(e: DataTableUnselectParams): void; - onCellClick?(e: DataTableCellClickEventParams): void; + onCellClick?(e: DataTableCellClickEventParams): void; onCellSelect?(e: DataTableSelectParams): void; onCellUnselect?(e: DataTableUnselectParams): void; onColReorder?(e: DataTableColReorderParams): void; @@ -378,7 +378,7 @@ export interface DataTableProps extends Omit onRowExpand?(e: DataTableRowEventParams): void; onRowMouseEnter?(e: DataTableRowMouseEventParams): void; onRowMouseLeave?(e: DataTableRowMouseEventParams): void; - onRowReorder?(e: DataTableRowReorderParams): void; + onRowReorder?(e: DataTableRowReorderParams): void; onRowSelect?(e: DataTableSelectParams): void; onRowToggle?(e: DataTableRowToggleParams): void; onRowUnselect?(e: DataTableUnselectParams): void; @@ -387,7 +387,7 @@ export interface DataTableProps extends Omit onSort?(e: DataTablePFSEvent): void; onStateRestore?(state: object): void; onStateSave?(state: object): void; - onValueChange?(value: any[]): void; + onValueChange?(value: DataTableRowDataArray): void; rowClassName?(data: DataTableRowData, options: DataTableRowClassNameOptions): object | string; rowEditValidator?(data: DataTableRowData, options: DataTableRowEditValidatorOptions): boolean; rowExpansionTemplate?(data: DataTableRowData, options: DataTableRowExpansionTemplate): React.ReactNode;