Go to file
2024-10-21 23:33:49 +02:00
.editorconfig Initial commit 2022-06-17 14:54:06 +02:00
.gitignore Initial commit 2022-06-17 14:54:06 +02:00
column-mover.js Add column mover 2024-01-18 16:27:07 +01:00
column-resizer.js Add column mover 2024-01-18 16:27:07 +01:00
LICENSE Initial commit 2022-06-17 14:54:06 +02:00
package-lock.json Initial implementation. 2022-06-17 16:13:55 +02:00
package.json Various fixes 2024-10-21 23:33:49 +02:00
pagination.js Initial implementation. 2022-06-17 16:13:55 +02:00
README.md Various fixes 2024-10-21 23:33:49 +02:00
tp-table-item.js Various fixes 2024-10-21 23:33:49 +02:00
tp-table.js Various fixes 2024-10-21 23:33:49 +02:00
tp-text-filter.js Initial implementation. 2022-06-17 16:13:55 +02:00

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.