#82 multiselection UI for datatable

This commit is contained in:
Denys Vuika
2016-05-20 13:30:11 +01:00
parent 4e9deac9ed
commit 58f7429f25
7 changed files with 70 additions and 6 deletions

View File

@@ -25,25 +25,33 @@ export interface DataTableAdapter {
getSorting(): DataSorting;
setSorting(sorting: DataSorting): void;
sort(key?: string, direction?: string): void;
}
export interface DataRow {
isSelected: boolean;
hasValue(key: string): boolean;
getValue(key: string): any;
}
export interface DataColumn {
key: string;
type: string; // text|image
sortable?: boolean;
title?: string;
srTitle?: string;
cssClass?: string;
}
export class DataSorting {
constructor(
public key?: string,
public direction?: string) {
}
}

View File

@@ -97,6 +97,9 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
// Simple implementation of the DataRow interface.
export class ObjectDataRow implements DataRow {
isSelected: boolean = false;
constructor(
private obj: any) {
}