Skip to main content
2.0.0Next2.0.92.0.82.0.72.0.62.0.52.0.42.0.32.0.22.0.12.0.01.0.0
Version: 2.0.0

Table

The Table component is used to display information in a structured way. Tables are divided into rows and columns, with the first row and column explaining what the content of that row or column contains. They are useful for giving an overview of raw information to the users, but can have the drawback of being overly information dense.

Basic Usage

<triton-table></triton-table>
<TritonTable/>
<html> 
<head>
<script type="module">
import { defineCustomElements } from '~node_modules/@kognifai/triton-cl-core/loader/index.es2017.js';
defineCustomElements();
</script>
</head>
<body>
<triton-table></triton-table>
</body>
</html>

Documentation for this component is still in development

With component

A table can be created using the Triton Table props columns and data.

With classnames

The second options is to add a triton-table tag around a w3 standard HTML Table. This options can be used for more detailed management of the table.

Playground

Node ID Logical NetworkHost name Type Description
16385Floatel Testn16386-nndf-001RouterCisco809-Common
16385Noble Drillingn16386-nndf-001RouterCisco809-Common
16385Commonn16386-nndf-001RouterCisco881

API

Properties

PropertyDescriptionTypeDefault
actionsDescribe action buttons to show in each table rowTableRowAction[]-
columnsDescribe columns to show in the table. Table headersTableColumn[]-
dataThe full set of table data to be displayed in the tableTableData[]-
identification-property-nameThe name of the property of the TableData item used for identificationUsed to set the data-indentificator attribute ot each row DIV elementstring'key'
render-actions-styleSet the kind of rendering type for actionsIf is set to icons, actions will be rendered as iconsIf is set to context-menu, actions will be rendered as triton-menu-items in triton-drop-downcontext-menu icons'icons'
show-hover-effectAllow hover over effect for table rowsboolean-

Events

NameTypeDescriptionExtra
atRowClickCustomEvent<CustomEvent<any>>Emitted when a table row is clicked.-
atRowMouseOutCustomEvent<CustomEvent<any>>Emitted when the mouse goes out of a table row.-
atRowMouseOverCustomEvent<CustomEvent<any>>Emitted when the mouse goes over a table row.-
atDropdownStateChangeCustomEvent<boolean>Emit boolean when state of the dropdown change-
atClickCustomEvent<void>The default click behavior of the button-
atSelectCustomEvent<string>Emit when the key prop changes-
atClickCustomEvent<void>The default click behavior of the button-
selectedItemContentCustomEvent<HTMLTritonMenuItemElement>Emitted when the content of the menu item is selected-

Slots

Main

takes any kind of markup element

<triton-table>
<div></div>
</triton-table>

Details

Depends on