mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-2353] replaced datatable with mat-list (#3085)
* [ADF-2353] replaced datatable with mat-list * [ADF-2353] fixed test for the new mat-list comment
This commit is contained in:
@@ -17,12 +17,13 @@
|
||||
|
||||
import { CommentProcessModel, PeopleProcessService, UserProcessModel } from '@alfresco/adf-core';
|
||||
import { DatePipe } from '@angular/common';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-comment-list',
|
||||
templateUrl: './comment-list.component.html',
|
||||
styleUrls: ['./comment-list.component.scss']
|
||||
styleUrls: ['./comment-list.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
})
|
||||
|
||||
export class CommentListComponent {
|
||||
@@ -40,8 +41,12 @@ export class CommentListComponent {
|
||||
constructor(private datePipe: DatePipe, public peopleProcessService: PeopleProcessService) {
|
||||
}
|
||||
|
||||
selectComment(event: any): void {
|
||||
this.selectedComment = event.value.obj;
|
||||
selectComment(comment: CommentProcessModel): void {
|
||||
if (this.selectedComment) {
|
||||
this.selectedComment.isSelected = false;
|
||||
}
|
||||
comment.isSelected = true;
|
||||
this.selectedComment = comment;
|
||||
this.clickRow.emit(this.selectedComment);
|
||||
}
|
||||
|
||||
@@ -74,9 +79,4 @@ export class CommentListComponent {
|
||||
}
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
hasComments(): boolean {
|
||||
return this.comments && this.comments.length && true;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user