dynamic-mat-table
Version:
dynamic-mat-table is an Angular component for presenting large and complex data with a lightning fast performance (at least 10x faster) and excellent level of control over the presentation.
37 lines (36 loc) • 1.22 kB
TypeScript
import { SelectionModel } from '@angular/cdk/collections';
import { HashMap } from '../cores/type';
import { ContextMenuItem } from './context-menu.model';
import { TableField } from './table-field.model';
export interface TableRow {
id?: number;
rowActionMenu?: {
[key: string]: ContextMenuItem;
};
option?: RowOption;
}
export declare type TableSelectionMode = 'single' | 'multi' | 'none';
export declare type RowEventType = 'MasterSelectionChange' | 'RowSelectionChange' | 'RowActionMenu' | 'RowClick' | 'DoubleClick' | 'CellClick' | 'LabelClick' | 'BeforeContextMenuOpen' | 'ContextMenuClick';
export interface IRowEvent {
event: RowEventType | any;
sender: {
row?: any;
column?: TableField<any>;
selectionModel?: SelectionModel<any>;
[t: string]: any;
};
}
export interface ITableEvent {
event: 'ReloadData' | 'SortChanged' | 'ExportData' | any;
sender: any | undefined;
}
export interface IRowActionMenuEvent<T> {
actionItem: ContextMenuItem;
rowItem: T;
}
export interface RowOption extends HashMap<any> {
style?: any;
class?: any;
selected?: boolean;
expand?: boolean;
}