From 21688db076a15c34768aa8eab73da6dcdd91b870 Mon Sep 17 00:00:00 2001 From: Joost Kaptein Date: Wed, 4 Dec 2024 16:01:28 +0000 Subject: [PATCH] features for row grouping --- src/AgGrid.fs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/AgGrid.fs b/src/AgGrid.fs index c58b603..aaa5336 100644 --- a/src/AgGrid.fs +++ b/src/AgGrid.fs @@ -716,6 +716,16 @@ type AgGrid<'row> = icon: obj option//HtmlElement } + type IGroupCellRendererParams<'row, 'value> = { + suppressCount: bool + suppressDoubleClickExpand: bool + checkBox: bool + innerRenderer: ICellRendererParams<'row, 'value> -> ReactElement + innerRendererParams: obj array + totalValueGetter: string + } + + [] type BuiltInMenuItem = | AutoSizeAll @@ -763,6 +773,8 @@ type AgGrid<'row> = static member inline rowGroup(v: bool) = columnDefProp<'row, 'value> ("rowGroup" ==> v) static member inline suppressAggFuncInHeader(v:bool) = columnDefProp<'row, 'value> ("suppressAggFuncInHeader" ==> v) + static member inline GroupCellRendererParams(v: IGroupCellRendererParams<'row, 'value>) = + columnDefProp<'row, 'value> ("cellRendererParams" ==> v) [] type AgGrid<'row> = @@ -772,6 +784,9 @@ type AgGrid<'row> = static member inline groupDisplayType(v: RowGroupingDisplayType) = agGridProp<'row> ("groupDisplayType", v.RowGroupingDisplayTypeText) + static member inline autoGroupColumnDef(values: IColumnDefProp<'row, 'value> seq) = + agGridProp ("autoGroupColumnDef", values |> unbox<_ seq> |> createObj) + static member inline pivotMode(v: bool) = agGridProp<'row> ("pivotMode", v) static member inline getDataPath( v: 'row -> string array) = agGridProp<'row> ("getDataPath", v) @@ -789,4 +804,4 @@ type AgGrid<'row> = | BuiltIn builtInItemName -> box builtInItemName.BuiltInMenuItemText | Custom customMenuItem -> box customMenuItem |] - ) + ) \ No newline at end of file