[ADF-3196] fixed task selection and double click (#3484)

This commit is contained in:
Vito
2018-06-14 16:42:28 +01:00
committed by Eugenio Romano
parent c0de0d5087
commit af2cde0791
7 changed files with 22 additions and 57 deletions

View File

@@ -252,19 +252,18 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
*/
selectTask(taskIdSelected: string): void {
if (!this.isListEmpty()) {
let dataRow;
let dataRow = null;
if (taskIdSelected) {
dataRow = this.rows.find((currentRow: any) => {
return currentRow['id'] === taskIdSelected;
});
if (!dataRow) {
dataRow = this.rows[0];
}
} else {
} else if (this.selectFirstRow) {
dataRow = this.rows[0];
}
this.rows[0] = dataRow;
this.currentInstanceId = dataRow['id'];
if (dataRow) {
dataRow.isSelected = true;
this.currentInstanceId = dataRow['id'];
}
} else {
this.currentInstanceId = null;
}