[ADF-5002] Datatable - fix focus selection for grid list (#5268)

* [ADF-5002] Datatable - fix focus selection for grid list

* fix faling e2e
This commit is contained in:
Silviu Popa
2019-11-20 17:31:19 +02:00
committed by Eugenio Romano
parent d87c9ec401
commit 202764631a

View File

@@ -408,7 +408,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
}
if (row) {
const rowIndex = this.data.getRows().indexOf(row) + (this.isHeaderVisible() ? 1 : 0);
const rowIndex = this.data.getRows().indexOf(row) + (this.isHeaderListVisible() ? 1 : 0);
this.keyManager.setActiveItem(rowIndex);
const dataRowEvent = new DataRowEvent(row, mouseEvent, this);
@@ -422,6 +422,10 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
}
}
private isHeaderListVisible(): boolean {
return this.isHeaderVisible() && this.display === DisplayMode.List;
}
private handleRowSelection(row: DataRow, e: KeyboardEvent | MouseEvent) {
if (this.data) {
if (this.isSingleSelectionMode()) {