-
Notifications
You must be signed in to change notification settings - Fork 399
FolderPicker - Improvment to automatically detect URL type #1658
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
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
@stevebeauge, if you would like to give a hand on this one, let us know 🙂 Edit: of course, if I've mistakenly wrote the improvment idea, please let me know. |
I think the improvement can be broader than just the folder picker. Let me reformulate my vision Basically, SharePoint has three kind of URL:
Most of the SharePoint API require one specific form of URL (server relative is the most used I'd say). This leads the developer to need an understanding of which form of url is required, and convert from another form (ex: type the url of a site collection in a textbox and query data inside it). My proposal is to integrate a utility module that can convert any url to the desired form. Whenever a component or a service requires a specific form of url which is dependent on external input, such utility may ensure the correctness of the application. For example, regarding the FolderPicker, we could replace This is only an example. Once the utility is present in the code, progressive inclusion of the helper could be added to existing controls. Such utility is already in place in our spfx code base. I should be able to port it (the code is actually quite simple). These functions are available:
If you think this idea has its place, I can try to apply on the folder picker as a try |
Category
[x] Enhancement
[ ] Bug
[ ] Question
Version
Please specify what version of the library you are using: [3.15.0]
Expected / Desired Behavior / Question
Raised by #1379, the idea is to enhance the
rootFolder.ServerRelativeUrl
to automatically detect if it's absolute or notObserved Behavior
Current version of the control only works with server relative URL. Some additional work has to be done when working with another site collection than the context's one.
Steps to Reproduce
siteAbsoluteUrl
prop to another site collectionThe text was updated successfully, but these errors were encountered: