[Proposal] component configuration pattern #5566
-
This came up during a chat about how to allow a cell's popover to completely dismiss the buttons we render for the cell actions (#5132). I don't know what the pattern is called, but the elastic charts library uses this for providing configurations, as do a number of other libraries. While considering the existing datagrid.js
This same pattern could be used for the expansion popover to be told not to render the default action buttons. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
Another place this could be used, though likely a terrible, terrible idea: this could be used by individual cells to provide row props (see #5555). Cells could provide any prop they want to see on the row, and those would be merged together at a row unit. This idea has other complications such as there is no row unit but hey, we're just thinking out loud here. |
Beta Was this translation helpful? Give feedback.
-
One quick comment on How will this work in the future when we add more config props for, e.g. the cell popover footer, or perhaps allowing cells to set/configure Or, with future configuration in mind, are we simply adding all possible configurations to a cell as Or alternatively: why not bypass context completely? If we declare |
Beta Was this translation helpful? Give feedback.
-
CellWrapper component(idea from a conversation with @flash1293 ) Instead of providing a
this |
Beta Was this translation helpful? Give feedback.
-
useCellProps hook(idea from a conversation with @flash1293) Instead of providing a convenience component, a more common pattern is a convenience hook
|
Beta Was this translation helpful? Give feedback.
useCellProps hook
(idea from a conversation with @flash1293)
Instead of providing a convenience component, a more common pattern is a convenience hook