@tp/tp-table (1.6.0)
Installation
@tp:registry=https://gitea.codeblob.work/api/packages/tp-elements/npm/npm install @tp/tp-table@1.6.0"@tp/tp-table": "1.6.0"About this package
tp-table
Displays a list of items in a interactive table.
Defining columns
The columns property is an array of objects that define the columns of the table.
Each column object has the following properties:
label: The label of the column.name: The name of the column. This is the property name within the item object that is currently being displayed.width: The width of the column in pixels. Should be a string like100px.required: Whether the column is required. Required columns are always visible.visible: Whether the column is visible by default.sortable: Whether the column is sortable.
Custom table elements
To override the default table column headers you can override the renderColumnHeader(column, idx) method.
To override only the selection header, provide a selectionHeaderRenderer function property. Return null or undefined to use the default select-all checkbox.
To override the default cell elements you can override the renderItem(item, idx, columns, selected) method.
Styling
--tp-table-checkbox-column-width: Width of the checkbox selection column. Defaults to40px.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @lit-labs/virtualizer | ^2.1.1 |
| @tp/helpers | ^2.1.0 |
| @tp/tp-checkbox | ^1.0.7 |
| @tp/tp-icon | ^1.0.1 |
| @tp/tp-scroll-threshold | ^1.0.0 |
| lit | ^3.0.0 |
Details
Assets (1)
Versions (13)
View all
tp-table-1.6.0.tgz
13 KiB