[Proposal]: Add dynamic slots for KTable columns #743
Labels
Component: KTable
TODO: needs decisions
Further discussion and planning necessary
type: proposal
New feature or request
Product
KDS.
Desired behavior
I would like to be able to customize the contents of certain columns in a table using dynamic slots. For example:
We can pass an id to our headers array:
And for the columns that have that id we can add a slot with that name to have specific content for that column:
So if there is a column that has a dynamic slot, use that slot to render its content, otherwise use the default #cell.
Current behavior
Currently if I wanted custom content for the city column, I have to use the colIndex of that column:
The Value Add
This improves maintainability as if we change the position of the headers, or prepends any column, we wouldnt have to change the template or have to deal with counting which index corresponds to each attribute.
Possible Tradeoffs
We must find an effective way to communicate this in the api docs. Since it can be a bit confusing to have something like a dynamic slot in the slots table in the documentation.
The text was updated successfully, but these errors were encountered: