hoist-react icon indicating copy to clipboard operation
hoist-react copied to clipboard

`Column.cellClassRules` type misleading w.r.t. autosize support

Open amcclain opened this issue 1 year ago • 1 comments

Our type for Column.cellClassRules references ColumnCellClassRuleFn which is a function that specs and arg of type AG-provided CellClassParams

https://github.com/xh/hoist-react/blob/30b3222a51fc9746debe35eaebeec20643033cc8/cmp/grid/Types.ts#L239

That includes a number of params - notable column/colDef that are not provided when the same function is called during an autosize operation by ColumnWidthCalculator:

https://github.com/xh/hoist-react/blob/30b3222a51fc9746debe35eaebeec20643033cc8/cmp/grid/impl/ColumnWidthCalculator.ts#L355

Ideally we would support as many of the potentially-useful params here as we can. In any case, we should make it more clear what the limits are.

amcclain avatar Aug 09 '23 20:08 amcclain