Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@covalent/data-table

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@covalent/data-table

Teradata UI Platform Data Table Module

  • 0.9.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

td-data-table

td-data-table element generates a data driven table layout sorting events.

Use [tdDataTableTemplate] directive for template support which gives context access to [value], [row] and [column].

API Summary

Properties:

NameTypeDescription
dataany[]Rows of data to be displayed.
columnsITdDataTableColumn[]List of columns to be displayed.
selectable?booleanEnables row selection events, hover and selected row states.
multiple?booleanEnables multiple row selection. [selectable] needs to be enabled.
sortable?booleanEnables sorting events, sort icons and active column states.
sortBy?stringSets the active sort column. [sortable] needs to be enabled.
sortOrder?TdDataTableSortingOrderSets the sort order of the [sortBy] column. [sortable] needs to be enabled. Defaults to 'ASC' or TdDataTableSortingOrder.Ascending
sortChangefunctionEvent emitted when the column headers are clicked. [sortable] needs to be enabled. Emits an [ITdDataTableSortEvent] implemented object.
rowSelectfunctionEvent emitted when a row is selected/deselected. [selectable] needs to be enabled. Emits an [ITdDataTableSelectEvent] implemented object.

Setup

Import the [CovalentDataTableModule] using the forRoot() method in your NgModule:

import { CovalentDataTableModule } from '@covalent/data-table';
@NgModule({
  imports: [
    CovalentDataTableModule.forRoot(),
    ...
  ],
  ...
})
export class MyModule {}

Usage

Example for HTML usage:

<td-data-table
 [data]="data"
 [columns]="columns"
 [selectable]="true|false"
 [multiple]="true|false"
 [sortable]="true|false"
 [sortBy]="sortBy"
 [sortOrder]="'ASC'|'DESC'"
 (sortChange)="sortEvent($event)"
 (rowSelect)="selectEvent($event)">
 <template tdDataTableTemplate="columnName" let-value="value" let-row="row" let-column="column">
   <div layout="row">
     <span flex>{{value}}</span> // or <span flex>{{row[column]}}</span>
     <md-icon>star</md-icon>
   </div>
 </template>
</td-data-table>

Keywords

FAQs

Package last updated on 23 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc