<Table :fields="[Field]" :items="[Object]" multiSort hover />
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
fields | The fields of the table | Field[] | - | undefined |
items | The items that are shown in the table | Record<string, unknown>[] | - | () => [] |
multiSort | Defines if multiple items can be sorted at once | boolean | - | false |
hover | Defines if the table-hover class should be used |
boolean | - | false |
onClick:row | Defines if the table-click class should be used |
func | - | undefined |
tbodyTrClass | The classes that will be forwarded to the tbody tr | string|array|object|func | - | undefined |
theadTrClass | The classes that will be forwarded to the tbody tr | string|array|object | - | undefined |
Name | Description | Bindings |
---|---|---|
header-${header.key} |
Displays the header of the table | key string - The key of the headerheader object - The header object |
header-${header.key}-content |
Displays the content of the table header | header object - The header object |
top-row | Displays as the top row of the table | headers object[] - The headers of the table |
no-items | Displays if there are no items in the table | headers object[] - The headers of the table |
row | Displays the row of the table | item object - The item objectindex int - The index of the item |
header.key | Displays the content of the table row | key any - The key of the headerfield object - The header objectitem object - The item of the rowindex int - The index of the item of the rowvalue any - The value that should be displayed |
${header.key}-content |
Displays the content of the table row | field any - The header objectitem object - The item of the rowindex int - The index of the item of the rowvalue any - The value that should be displayed |
bottom-row | Displays as the bottom row of the table | headers object[] - The headers of the table |
Event name | Properties | Description |
---|---|---|
click:row | item object - The row that was clicked |
Fired when a row is clicked |
hover:row | item object - The row that was hoveredundefined unknown - e The event |
Fired when a row is hovered |
sort | sorted object - The sort object |
Fired when the sorting of a column is changed |