[RFC] Should we move Cell, ColumnHeader and Rows into the component prop? #896
Replies: 3 comments 2 replies
-
Why, what are the pros & cons? |
Beta Was this translation helpful? Give feedback.
-
From what I understand:
I don't really buy into this consistency argument. I think that two situations different enough can have two different solutions. We had almost the same case in the Autocomplete or DatePicker. We plan/have a
Why is it better, and not worse? The render function seems to be a perfect use case for the column definition, it's stateless and very specific to a column. A counter proposal, have the best of the two options: <props.components.Cell {...x}>
{props.columns[x].renderCell(x)}
<props.components.Cell> |
Beta Was this translation helpful? Give feedback.
-
Ok sorry for the late reply. So I've checked the pros and cons and, more importantly, how it will be used. IMO the current way to "customize" a cell is better than the proposed one. My argument is that it is likely that people will need to customize a very specific cell. The current way of doing that is more straight forward than the proposed one because if I am to provide a custom Also, the other components that allow customization via replacing entire components is a different use case than the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ATM to customize the cell, or the column header you have to use the
ColDef
object.The idea is to refactor
renderCell
,renderHeader
, potentially as well, thevalueGetter
and move to a Cell component slot.Beta Was this translation helpful? Give feedback.
All reactions