mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4947] Array type supported in data table columns (#5165)
* [WIP] [ADF-4947] Array type supported in data table columns * * removed resolver for aria label * * process services feature added * * fixed docs
This commit is contained in:
@@ -28,7 +28,7 @@ export interface DataTableAdapter {
|
||||
setRows(rows: Array<DataRow>): void;
|
||||
getColumns(): Array<DataColumn>;
|
||||
setColumns(columns: Array<DataColumn>): void;
|
||||
getValue(row: DataRow, col: DataColumn): any;
|
||||
getValue(row: DataRow, col: DataColumn, resolverFn?: (row: DataRow, col: DataColumn) => any): any;
|
||||
getSorting(): DataSorting;
|
||||
setSorting(sorting: DataSorting): void;
|
||||
sort(key?: string, direction?: string): void;
|
||||
|
@@ -99,7 +99,7 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
this._columns = columns || [];
|
||||
}
|
||||
|
||||
getValue(row: DataRow, col: DataColumn): any {
|
||||
getValue(row: DataRow, col: DataColumn, resolver?: (row: DataRow, col: DataColumn) => any ): any {
|
||||
if (!row) {
|
||||
throw new Error('Row not found');
|
||||
}
|
||||
@@ -107,6 +107,10 @@ export class ObjectDataTableAdapter implements DataTableAdapter {
|
||||
throw new Error('Column not found');
|
||||
}
|
||||
|
||||
if (resolver) {
|
||||
return resolver(row, col);
|
||||
}
|
||||
|
||||
const value = row.getValue(col.key);
|
||||
|
||||
if (col.type === 'icon') {
|
||||
|
Reference in New Issue
Block a user