Closed tomivirkki closed 11 months ago
The current API for using a React component for a Grid column's header requires using a headerRenderer function:
headerRenderer
<GridColumn headerRenderer={() => <span>Header</span>} />
Simplify the API by making the header property in GridColumn accept a ReactNode, which could then be mapped to a renderer internally:
header
GridColumn
ReactNode
<GridColumn header={<span>Header</span>} />
A similar footer property (accepting a ReactNode) should also be added.
footer
Here's an example (from Dialog) on how to implement it: https://github.com/vaadin/react-components/blob/764496a2443afa5f4cee074726a1f456a79e8728/src/Dialog.tsx#L24-L25
Dialog
The current API for using a React component for a Grid column's header requires using a
headerRenderer
function:Simplify the API by making the
header
property inGridColumn
accept aReactNode
, which could then be mapped to a renderer internally:A similar
footer
property (accepting aReactNode
) should also be added.Here's an example (from
Dialog
) on how to implement it: https://github.com/vaadin/react-components/blob/764496a2443afa5f4cee074726a1f456a79e8728/src/Dialog.tsx#L24-L25