mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#82 multiselection UI for datatable
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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) {
|
||||
}
|
||||
|
Reference in New Issue
Block a user