Open codewithkyle opened 3 years ago
Data tables should accept an array of header/body cell render functions. Functions should return a TemplateResult
or string
type.
type Cell = (cell:any) => TemplateResult | string;
interface DataTableSettings {
headerCells: Array<Cell>,
bodyCells: Array<Cell>,
}
We will never be able to create a "prefect" table component. A developer will always need something unique, something custom based on their data set. If we defer the templating logic to the developer they can add as many cells as they wish while being able to strictly control the output and functionality of each cell.
Data tables should support these features:
Functionality reference