-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FolderExplorer and FolderPicker do not seem to work for document libraries #741
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Checked the history, seems to be broken recently by this commit actually: @gautamdsheth Don't understand the reason for this change - pnpjs already does the encoding - check here? This commit seems to introduce the bug with double-encoding? |
I did test with normal as well as some folders with special chars like |
@gautamdsheth My guess is that pnpjs version might have been updated and this part not re-checked? But the point is now it seems that FolderExplorer and FolderPicker are simply not working 😄 Would be great if maintainers could look at this in the upcoming release. |
Reaplced the PR with another to dev branch |
Sorry for the messed up PR (would be great if the maintainers can delete them 😅 |
Hi @nbelyh, @gautamdsheth - I've merged the PR. @gautamdsheth - could you please check beta version and confirm that it works correctly for the use-cases you were addressing in your previous PR? Thank you! |
@AJIXuMuK - works fine with the latest beta. Thanks |
Thank you guys, then I'm closing the issue |
FolderExplorer and FolderPicker controls do not seem to work for the document libraries
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [2.1.0]
Description
Create a sample project with FolderExplorer, as specified in the documentation:
https://pnp.github.io/sp-dev-fx-controls-react/controls/FolderExplorer/
Expected
You see the folder explorer in the UI, showing corresponding folders/libraries.
Observed Behavior
The FolderExplorer does not work, it always shows "there are no folders" and throws this exception in console:
Reasons (most probably pnpjs library modified after the FolderExplorer was last verified?)
1.
@pnp/sp/lists
is not included in the FileExplorerService.ts, here:sp-dev-fx-controls-react/src/services/FolderExplorerService.ts
Lines 1 to 9 in dda0256
But is used here:
sp-dev-fx-controls-react/src/services/FolderExplorerService.ts
Line 44 in dda0256
The result is, web.lists is undefined and that result in the exception.
sp-dev-fx-controls-react/src/services/FolderExplorerService.ts
Line 75 in dda0256
pnpjs (getFolderByServerRelativePath) also encodes it, in the referenced version 2.0.6 as well:
https://github.com/pnp/pnpjs/blob/183dc11edb65aa67f6e053e03fb28c5dbdb8a9a5/packages/sp/folders/web.ts#L58
The text was updated successfully, but these errors were encountered: