selected row highlight (#1448)

* showing selected row

Support for showing selected row for the components:

- DataTable
- DocumentList
- Activiti TaskList
- Activiti ProcessList

fixes #170

* unit test fixes
This commit is contained in:
Denys Vuika
2017-01-13 12:45:37 +00:00
committed by Mario Romano
parent 01ab948666
commit 0fa87bb17d
8 changed files with 37 additions and 15 deletions

View File

@@ -53,10 +53,6 @@ export class DataTableComponent implements OnInit {
@Output()
rowDblClick: EventEmitter<DataRowEvent> = new EventEmitter<DataRowEvent>();
noContentTemplate: TemplateRef<any>;
isSelectAllChecked: boolean = false;
@Output()
showRowContextMenu: EventEmitter<any> = new EventEmitter();
@@ -66,6 +62,13 @@ export class DataTableComponent implements OnInit {
@Output()
executeRowAction: EventEmitter<any> = new EventEmitter();
noContentTemplate: TemplateRef<any>;
isSelectAllChecked: boolean = false;
get selectedRow(): DataRow {
return this.data.selectedRow;
}
ngOnInit() {
if (!this.data) {
this.data = new ObjectDataTableAdapter([], []);
@@ -82,6 +85,10 @@ export class DataTableComponent implements OnInit {
e.preventDefault();
}
if (this.data) {
this.data.selectedRow = row;
}
this.rowClick.emit({
value: row,
event: e