xh / hoist-react

🏗️ ⚛️ The XH Hoist toolkit for React
https://xh.io
Apache License 2.0
24 stars 8 forks source link

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

Open amcclain opened 1 year ago

amcclain commented 1 year ago

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 commented 2 months ago

@jskupsik do you recall what prompted this or how we came across it?