From ec29d74291da77d3281626f2807e17b84589ca22 Mon Sep 17 00:00:00 2001 From: "Herman (Von) Waters" Date: Thu, 25 Apr 2019 15:32:15 -0700 Subject: [PATCH] Muidatatables update (#34918) * added the 'empty' boolean to the MUIDataTableColumnOptions and 'React.ReactNode' to the 'customHeadRender' it still requires TableRow and TableCell * added name and updated versions to most recent * removed minor update notation * fixed header notation * added new line at the end of the doc * reverted the typescript version as per request --- types/mui-datatables/index.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/types/mui-datatables/index.d.ts b/types/mui-datatables/index.d.ts index 2b1135d60f..a617b00ce1 100644 --- a/types/mui-datatables/index.d.ts +++ b/types/mui-datatables/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/gregnb/mui-datatables // Definitions by: Jeroen "Favna" Claassens // Ankith Konda +// Herman "Von" Waters IV // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.1 @@ -9,7 +10,7 @@ import * as React from 'react'; interface MUIDataTableData { index: number; - data: Array; + data: Array; } interface MUIDataTableStateRows { @@ -97,6 +98,7 @@ export interface MUIDataTableTextLabels { export interface MUIDataTableColumnOptions { display?: 'true' | 'false' | 'excluded'; + empty?: boolean; filter?: boolean; filterList?: string[]; filterOptions?: string[]; @@ -106,7 +108,7 @@ export interface MUIDataTableColumnOptions { print?: boolean; download?: boolean; hint?: string; - customHeadRender?: (columnMeta: MUIDataTableCustomHeadRenderer, updateDirection: (params: any) => any) => string; + customHeadRender?: (columnMeta: MUIDataTableCustomHeadRenderer, updateDirection: (params: any) => any) => string | React.ReactNode; customBodyRender?: (value: any, tableMeta: MUIDataTableMeta, updateValue: (s: any, c: any, p: any) => any) => string | React.ReactNode; setCellProps?: (cellValue: string, rowIndex: number, columnIndex: number) => object; } @@ -176,7 +178,7 @@ export interface MuiDatatablesTableState { export interface MUIDataTableProps { title: string; columns: MUIDataTableColumnDef[]; - data: Array; + data: Array; options?: MUIDataTableOptions; } @@ -193,7 +195,7 @@ export interface MUIDataTablePopover { } export interface MUIDataTableBody { - data: Array; + data: Array; count: number; columns: MUIDataTableColumnDef[]; options: object;