mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
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:
committed by
Mario Romano
parent
01ab948666
commit
0fa87bb17d
@@ -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
|
||||
|
Reference in New Issue
Block a user