mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
upload version refresh (#3021)
This commit is contained in:
@@ -52,7 +52,7 @@ export class VersionListComponent implements OnChanges {
|
||||
.then(this.loadVersionHistory.bind(this));
|
||||
}
|
||||
|
||||
private loadVersionHistory() {
|
||||
loadVersionHistory() {
|
||||
this.isLoading = true;
|
||||
this.versionsApi.listVersionHistory(this.id).then((data) => {
|
||||
this.versions = data.list.entries;
|
||||
|
@@ -2,5 +2,5 @@
|
||||
<adf-version-upload [node]="node" (success)="onUploadSuccess($event)" (error)="onUploadError($event)"></adf-version-upload>
|
||||
</div>
|
||||
<div class="adf-version-list-container">
|
||||
<adf-version-list [id]="node.id"></adf-version-list>
|
||||
<adf-version-list #versionList [id]="node.id"></adf-version-list>
|
||||
</div>
|
||||
|
@@ -15,8 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Input, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
|
||||
import { Component, Input, ViewEncapsulation, ViewChild, Output, EventEmitter } from '@angular/core';
|
||||
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
|
||||
import { VersionListComponent } from './version-list.component';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-version-manager',
|
||||
@@ -35,7 +36,11 @@ export class VersionManagerComponent {
|
||||
@Output()
|
||||
uploadError: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@ViewChild('versionList')
|
||||
versionListComponent: VersionListComponent;
|
||||
|
||||
onUploadSuccess(event): void {
|
||||
this.versionListComponent.loadVersionHistory();
|
||||
this.uploadSuccess.emit(event);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user