@tp/tp-table (1.3.2)

Published 2024-10-21 23:33:54 +02:00 by pk in tp-elements/tp-table

Installation

@tp:registry=
npm install @tp/tp-table@1.3.2
"@tp/tp-table": "1.3.2"

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 like 100px.
  • 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 the default cell elements you can override the renderItem(item, idx, columns, selected) method.

Dependencies

Dependencies

ID Version
@lit-labs/virtualizer ^2.0.7
@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 ^2.8.0
Details
npm
2024-10-21 23:33:54 +02:00
2
trading_peter
Apache-2.0
latest
12 KiB
Assets (1)
Versions (6) View all
1.3.2 2024-10-21
1.3.1 2024-07-12
1.3.0 2024-01-18
1.2.0 2023-09-19
1.1.2 2023-09-02