Shows a list of comments.
Populate the comments in the component class:
import { CommentModel } from '@alfresco/adf-core'; class SomeComponent implements OnInit { comments: CommentModel[] = [ { id: 1, message: 'Comment number 1', created: new Date(), createdBy: { id: 1, email: '[email protected]', firstName: 'John', lastName: 'Doe' }, }, { id: 2, message: 'Comment number 2', created: new Date(), createdBy: { id: 2, email: '[email protected]', firstName: 'Jane', lastName: 'Doe' }, } ]; onClickCommentRow(comment: CommentModel) { console.log('Clicked row: ', comment); }
In the component template use the comment list component:
<adf-comment-list
[comments]="comments"
(clickRow)="onClickCommentRow($event)">
</adf-comment-list>
Name | Type | Default value | Description |
---|---|---|---|
comments | CommentModel [] | The comments data used to populate the list. |
Name | Type | Description |
---|---|---|
clickRow | EventEmitter < CommentModel > | Emitted when the user clicks on one of the comment rows. |
© 2023 Alfresco Software, Inc. All Rights Reserved.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.