@stratio/egeo
Version:
163 lines (159 loc) • 6.06 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stratio Egeo - Documentation</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="assets/images/favicon.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
</head>
<body class="container-fluid">
<a href="/index.html">Go Back to index</a><br>
<h1 id="tablecomponent">Table (Component)</h1>
<p>The table component has been designed to display any content like images, text, graphs, etc.</p>
<h2 id="inputs">Inputs</h2>
<table class="table table-striped">
<thead>
<tr>
<th id="property">Property</th>
<th id="type">Type</th>
<th id="req">Req</th>
<th id="description">Description</th>
<th id="default">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>fields</td>
<td>StTableHeader[]</td>
<td>False</td>
<td>List of field displayed in the header</td>
<td>''</td>
</tr>
<tr>
<td>qaTag</td>
<td>String</td>
<td>False</td>
<td>Prefix used to generate the id values for qa tests</td>
<td>''</td>
</tr>
<tr>
<td>header</td>
<td>Boolean</td>
<td>False</td>
<td>Boolean to show or hide the header</td>
<td>true</td>
</tr>
<tr>
<td>sortable</td>
<td>Boolean</td>
<td>False</td>
<td>Boolean to make sortable the table, To enable sorting of columns use the new "sortable" field inside stTableHeader model</td>
<td>true</td>
</tr>
<tr>
<td>selectableAll</td>
<td>Boolean</td>
<td>False</td>
<td>Boolean to show or hide a checkbox in the header to select or deselect all rows</td>
<td>false</td>
</tr>
<tr>
<td>currentOrder</td>
<td>Order</td>
<td>False</td>
<td>It specifies what is the current order applied to the table</td>
<td>''</td>
</tr>
<tr>
<td>customClasses</td>
<td>String</td>
<td>False</td>
<td>Classes for adding styles to table tag from outside. These can be: separated-rows</td>
<td></td>
</tr>
<tr>
<td>fixedHeader</td>
<td>Boolean</td>
<td>False</td>
<td>Boolean to fix the table header</td>
<td>false</td>
</tr>
<tr>
<td>selectedAll</td>
<td>Boolean</td>
<td>False</td>
<td>It specifies if all rows are selected</td>
<td>false</td>
</tr>
<tr>
<td>hasHoverMenu</td>
<td>Boolean</td>
<td>False</td>
<td>It specifies if a menu has to be displayed when user puts the mouse over the rows. Remember to add a cell with the selector st-table-row-hover for adding content to the menu</td>
<td>false</td>
</tr>
</tbody>
</table>
<h2 id="outputs">Outputs</h2>
<table class="table table-striped">
<thead>
<tr>
<th id="property">Property</th>
<th id="type">Type</th>
<th id="description">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>changeOrder</td>
<td>Order</td>
<td>Event emitted with the new order which has to be applied to the table rows</td>
</tr>
<tr>
<td>selectAll</td>
<td>Boolean</td>
<td>Event emitted when user interacts with the checkbox to select or deselect all rows</td>
</tr>
</tbody>
</table>
<h2 id="example">Example</h2>
<pre><code class="html language-html"><st-table [fields]="fields"
[sortable]="true"
(changeOrder)="yourFunctionToOrder($event)">
<tr st-table-row
ngFor="let userData of data">
<td st-table-cell
st-table-row-content>
<label>{{userData.id}}</label>
</td>
<td st-table-cell
st-table-row-content>
<label>{{userData.name}}</label>
</td>
<td st-table-cell
st-table-row-content>
<label>{{userData.lastName}}</label>
</td>
<td st-table-cell
st-table-row-content>
<label>{{userData.phone}}</label>
</td>
<td st-table-cell
st-table-row-content>
<label>{{userData.company}}</label>
</td>
<td st-table-cell
st-table-row-content>
<label>{{userData.completedProfile}}</label>
</td>
<td st-table-row-hover>
<i class="icon icon-arrow2_right"></i>
</td>
</tr>
</st-table>
</code></pre>
</body>
</html>