mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2393] fixed reloading on delete with infinite scrolling (#3057)
* [ADF-2393] fixed reloading on delete with infinite scrolling * [ADF-2393] refactored after PR
This commit is contained in:
@@ -295,7 +295,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
}
|
||||
|
||||
emitReadyEvent(event: any) {
|
||||
if (this.pageIsEmpty(event)) {
|
||||
if (this.standardPagination && this.pageIsEmpty(event)) {
|
||||
this.standardPagination.goPrevious();
|
||||
} else {
|
||||
this.documentListReady.emit(event);
|
||||
@@ -328,11 +328,20 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
onContentActionSuccess(message) {
|
||||
const translatedMessage: any = this.translateService.get(message);
|
||||
this.notificationService.openSnackMessage(translatedMessage.value, 4000);
|
||||
this.reloadForInfiniteScrolling();
|
||||
}
|
||||
|
||||
onDeleteActionSuccess(message) {
|
||||
this.uploadService.fileDeleted.next(message);
|
||||
this.deleteElementSuccess.emit();
|
||||
this.reloadForInfiniteScrolling();
|
||||
}
|
||||
|
||||
private reloadForInfiniteScrolling() {
|
||||
if (this.infiniteScrolling) {
|
||||
this.documentList.skipCount = 0;
|
||||
this.documentList.reload();
|
||||
}
|
||||
}
|
||||
|
||||
onManageVersions(event) {
|
||||
|
Reference in New Issue
Block a user