cancel
Showing results for 
Search instead for 
Did you mean: 

File view component - documentLibrary

rsocorro
Confirmed Champ
Confirmed Champ

I tried this code,

ngOnInit() {         let nodes: any = this.apiService.getInstance().nodes;         nodes.getNodeInfo('-root-', {             includeSource: true,             include: ['path', 'properties'],             relativePath: '/Sites/swsdp/documentLibrary'        })         .then(node => {             console.log(node);             this.currentFolderId = node.id;             this.changeDetector.detectChanges();         });     }

to set my default folder to be the documentLibrary, but nothing happens, I still need to browse sites, then swsdp to access documentLibrary.

1 ACCEPTED ANSWER

eugenio_romano
Elite Collaborator
Elite Collaborator

I guess you didn't assigned to the document list your new currentFolderId calculated in the init:

<adf-document-list
  #documentList
  [currentFolderId]="currentFolderId">

you have always root as value in the currentFolderId.

View answer in original post

12 REPLIES 12

You are right Eugenio, changing default code [currentFolderId]="'-my-'" with [currentFolderId]="currentFolderId" has been the solution.

Thank you very much.

Best regards,

Joël

Have you solved your problem regarding this one? because I'm getting an "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '-root-'. Current value: '-my-'." error with that, or is it because we're using different adf version?

never mind got it working now.