diff --git a/src/AgGrid.fs b/src/AgGrid.fs index aaa5336..b6715ee 100644 --- a/src/AgGrid.fs +++ b/src/AgGrid.fs @@ -58,6 +58,12 @@ type IColumn = { getColId: unit -> string } [] type IColumnDefProp<'row, 'value> = interface end +type IRowHeightParameters<'row> = { + data: 'row option + RowNode: IRowNode<'row> + api: IGridApi<'row> +} + let columnDefProp<'row, 'value> = unbox> // Although the AG Grid docs suggest that this should have two type params, we only give it one so that column defs @@ -506,6 +512,9 @@ type AgGrid<'row> = static member inline defaultColDef(defaults: IColumnDefProp<'row, 'value> seq) = agGridProp<'row> ("defaultColDef", defaults |> unbox<_ seq> |> createObj) + static member inline getRowHeight(v: IRowHeightParameters<'row> -> int option) = agGridProp<'row> ("getRowHeight", v) + + static member onColumnGroupOpened(callback: _ -> unit) = // This can't be inline otherwise Fable produces invalid JS let onColumnGroupOpened = fun ev ->