[ADF-2625] updating viewer on node editing (#3160)

* update viewer on metadata changes

* add test and docs
This commit is contained in:
Denys Vuika
2018-04-10 11:00:35 +01:00
committed by Eugenio Romano
parent 2b8f12fa57
commit 11d38efe2b
5 changed files with 78 additions and 5 deletions

View File

@@ -18,7 +18,7 @@
import { Component, Input, OnChanges, OnInit, SimpleChanges, SimpleChange, ViewEncapsulation } from '@angular/core';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { Observable } from 'rxjs/Observable';
import { CardViewItem, NodesApiService, LogService, CardViewUpdateService } from '@alfresco/adf-core';
import { CardViewItem, NodesApiService, LogService, CardViewUpdateService, AlfrescoApiService } from '@alfresco/adf-core';
import { ContentMetadataService } from '../../services/content-metadata.service';
import { CardViewGroup } from '../../interfaces/content-metadata.interfaces';
@@ -56,7 +56,8 @@ export class ContentMetadataComponent implements OnChanges, OnInit {
constructor(private contentMetadataService: ContentMetadataService,
private cardViewUpdateService: CardViewUpdateService,
private nodesApi: NodesApiService,
private logService: LogService) {}
private logService: LogService,
private apiService: AlfrescoApiService) {}
ngOnInit() {
this.cardViewUpdateService.itemUpdated$
@@ -65,6 +66,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit {
(node) => {
this.nodeHasBeenUpdated = true;
this.node = node;
this.apiService.nodeUpdated.next(node);
},
error => this.logService.error(error)
);