Skip to content

Commit

Permalink
add getRowHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
Larocceau committed Dec 4, 2024
1 parent 21688db commit 0abd6ea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AgGrid.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ type IColumn = { getColId: unit -> string }
[<Erase>]
type IColumnDefProp<'row, 'value> = interface end

type IRowHeightParameters<'row> = {
data: 'row option
RowNode: IRowNode<'row>
api: IGridApi<'row>
}

let columnDefProp<'row, 'value> = unbox<IColumnDefProp<'row, 'value>>

// Although the AG Grid docs suggest that this should have two type params, we only give it one so that column defs
Expand Down Expand Up @@ -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 ->
Expand Down

0 comments on commit 0abd6ea

Please sign in to comment.