I see this Note on ag-grid site:
Changing the row height is only supported in the in memory row model. You cannot use variable row height when using v
getRowHeight() is not supported in infinite row model. getRowHeight only works with the InMemoryRowModel
getRowHeight()