mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ACA-4205] safety checks to avoid crashes in doclist (#6432)
* safety checks to avoid crashes in doclist * reduce shared state in tests * fix test
This commit is contained in:
@@ -501,7 +501,9 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
this.ngZone.run(() => {
|
||||
this.resetSelection();
|
||||
if (this.node) {
|
||||
this.data.loadPage(this.node, this._pagination.merge, null, this.getPreselectNodesBasedOnSelectionMode());
|
||||
if (this.data) {
|
||||
this.data.loadPage(this.node, this._pagination.merge, null, this.getPreselectNodesBasedOnSelectionMode());
|
||||
}
|
||||
this.onPreselectNodes();
|
||||
this.syncPagination();
|
||||
this.onDataReady(this.node);
|
||||
@@ -698,7 +700,9 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
|
||||
onPageLoaded(nodePaging: NodePaging) {
|
||||
if (nodePaging) {
|
||||
this.data.loadPage(nodePaging, this._pagination.merge, this.allowDropFiles, this.getPreselectNodesBasedOnSelectionMode());
|
||||
if (this.data) {
|
||||
this.data.loadPage(nodePaging, this._pagination.merge, this.allowDropFiles, this.getPreselectNodesBasedOnSelectionMode());
|
||||
}
|
||||
this.onPreselectNodes();
|
||||
this.setLoadingState(false);
|
||||
this.onDataReady(nodePaging);
|
||||
|
Reference in New Issue
Block a user