mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5580] emit commentAdded event from adf-comments component (#10966)
* [ADF-5580] emit commentAdded event from adf-comments component * [ADF-5580] Emit commentAdded event from adf-comments and expose it in adf-node-comments * [ADF-5580] Emit commentAdded event from NodeCommentsComponent, add unit test, and update docs * [ADF-5580] Add unit test for commentAdded output in NodeCommentsComponent, update docs and create testing utils * [ADF-5580] Mark debugElement as readOnly * [ADF-5580] Add mock services and fix unit test setup * [ADF-5580] Reuse shared comment mocks across multiple test files * [ADF-5580] Align comments component documentation * [ADF-5580] Remove redundant setup and use ContentTestingModule in comment components tests
This commit is contained in:
@@ -15,7 +15,8 @@ Displays comments from users involved in a specified environment and allows an i
|
||||
```html
|
||||
<adf-comments
|
||||
[id]="YOUR_ID"
|
||||
[readOnly]="YOUR_READ_ONLY_FLAG">
|
||||
[readOnly]="YOUR_READ_ONLY_FLAG"
|
||||
(commentAdded)="onCommentAdded($event)">
|
||||
</adf-comments>
|
||||
```
|
||||
|
||||
@@ -23,13 +24,14 @@ Displays comments from users involved in a specified environment and allows an i
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| id | `string` | | The numeric ID of the task. |
|
||||
| readOnly | `boolean` | false | Are the comments read only? |
|
||||
| Name | Type | Default value | Description |
|
||||
| -------- | --------- | ------------- | --------------------------- |
|
||||
| id | `string` | | The numeric ID of the task. |
|
||||
| readOnly | `boolean` | false | Are the comments read only? |
|
||||
|
||||
### Events
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs while displaying/adding a comment. |
|
||||
| Name | Type | Description |
|
||||
| ------------ | --------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs while displaying/adding a comment. |
|
||||
| commentAdded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<CommentModel>` | Emitted when a new comment is successfully added. |
|
||||
|
Reference in New Issue
Block a user