@covalent/data-table
Version:
Teradata UI Platform Data Table Module
55 lines (54 loc) • 1.69 kB
TypeScript
import { EventEmitter, Renderer, ElementRef } from '@angular/core';
import { TdDataTableSortingOrder } from '../data-table.component';
export interface ITdDataTableSortChangeEvent {
order: TdDataTableSortingOrder;
name: string;
}
export declare class TdDataTableColumnComponent {
private _elementRef;
private _renderer;
private _sortOrder;
/**
* name?: string
* Sets unique column [name] for [sortable] events.
*/
name: string;
/**
* sortable?: boolean
* Enables sorting events, sort icons and active column states.
* Defaults to 'false'
*/
sortable: boolean;
/**
* active?: boolean
* Sets column to active state when 'true'.
* Defaults to 'false'
*/
active: boolean;
/**
* numeric?: boolean
* Makes column follow the numeric data-table specs and sort icon.
* Defaults to 'false'
*/
numeric: boolean;
/**
* sortOrder?: ['ASC' | 'DESC'] or TdDataTableSortingOrder
* Sets the sort order of column.
* Defaults to 'ASC' or TdDataTableSortingOrder.Ascending
*/
sortOrder: 'ASC' | 'DESC';
/**
* sortChange?: function
* Event emitted when the column headers are clicked. [sortable] needs to be enabled.
* Emits an [ITdDataTableSortChangeEvent] implemented object.
*/
onSortChange: EventEmitter<ITdDataTableSortChangeEvent>;
readonly bindClickable: boolean;
readonly bingSortable: boolean;
readonly bindActive: boolean;
readonly bindNumeric: boolean;
constructor(_elementRef: ElementRef, _renderer: Renderer);
handleSortBy(): void;
isAscending(): boolean;
isDescending(): boolean;
}