mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-1583] Fix change detection error (the quick way) (#2396)
* Fix change detection error (the quick way) * Fix it the second time
This commit is contained in:
committed by
Eugenio Romano
parent
cf0b45acb6
commit
9f0e40a6e8
@@ -4,7 +4,7 @@
|
||||
</adf-sites-dropdown>
|
||||
</div>
|
||||
<adf-upload-drag-area
|
||||
[parentId]="documentList.currentFolderId"
|
||||
[parentId]="getDocumentListCurrentFolderId()"
|
||||
[versioning]="versioning"
|
||||
[adf-node-permission]="'create'"
|
||||
[adf-nodes]="getCurrentDocumentListNode()">
|
||||
|
@@ -29,6 +29,8 @@ import { DocumentListComponent, PermissionStyleModel } from 'ng2-alfresco-docume
|
||||
|
||||
import { ViewerService } from 'ng2-alfresco-viewer';
|
||||
|
||||
const DEFAULT_FOLDER_TO_SHOW = '-my-';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-files-component',
|
||||
templateUrl: './files.component.html',
|
||||
@@ -36,7 +38,7 @@ import { ViewerService } from 'ng2-alfresco-viewer';
|
||||
})
|
||||
export class FilesComponent implements OnInit {
|
||||
// The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root-
|
||||
currentFolderId: string = '-my-';
|
||||
currentFolderId: string = DEFAULT_FOLDER_TO_SHOW;
|
||||
|
||||
errorMessage: string = null;
|
||||
fileNodeId: any;
|
||||
@@ -114,6 +116,7 @@ export class FilesComponent implements OnInit {
|
||||
}
|
||||
|
||||
onFolderChange($event) {
|
||||
this.currentFolderId = $event.value.id;
|
||||
this.router.navigate(['/files', $event.value.id]);
|
||||
}
|
||||
|
||||
@@ -220,7 +223,11 @@ export class FilesComponent implements OnInit {
|
||||
}
|
||||
|
||||
getSiteContent(site: SiteModel) {
|
||||
this.currentFolderId = site && site.guid ? site.guid : '-my-';
|
||||
this.currentFolderId = site && site.guid ? site.guid : DEFAULT_FOLDER_TO_SHOW;
|
||||
}
|
||||
|
||||
getDocumentListCurrentFolderId() {
|
||||
return this.documentList.currentFolderId || DEFAULT_FOLDER_TO_SHOW;
|
||||
}
|
||||
|
||||
hasSelection(selection: Array<MinimalNodeEntity>): boolean {
|
||||
|
Reference in New Issue
Block a user