mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-622] No implicit returns (#5157)
* enable noImplicitReturns rule * type fixes * fix return types * fix return value * fix tests * fix visibility service * update tests * add missing types * fix test
This commit is contained in:
@@ -260,10 +260,11 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
return rows.map((row) => new ObjectDataRow(row, row.isSelected));
|
||||
}
|
||||
|
||||
convertToDataSorting(sorting: any[]): DataSorting {
|
||||
convertToDataSorting(sorting: any[]): DataSorting | null {
|
||||
if (sorting && sorting.length > 0) {
|
||||
return new DataSorting(sorting[0], sorting[1]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private initAndSubscribeClickStream() {
|
||||
@@ -362,7 +363,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
}
|
||||
}
|
||||
|
||||
private setTableSorting(sorting) {
|
||||
private setTableSorting(sorting: any[]) {
|
||||
if (this.data) {
|
||||
this.data.setSorting(this.convertToDataSorting(sorting));
|
||||
}
|
||||
@@ -610,10 +611,12 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
|
||||
return `${row.cssClass} ${this.rowStyleClass}`;
|
||||
}
|
||||
|
||||
getSortingKey(): string {
|
||||
getSortingKey(): string | null {
|
||||
if (this.data.getSorting()) {
|
||||
return this.data.getSorting().key;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
selectRow(row: DataRow, value: boolean) {
|
||||
|
Reference in New Issue
Block a user