In SharePoint there used to be a ‘copy shortcut’ option in the right-click menu on a document. This feature is not available currently. Now we need to go to the share sub-menu to get a link to the document, but what is offered there is the docidredir link, not the full path.
This SPFx extension opens a dialog where the user can see the document full path. The Email Link button helps the user to share the link via default email client.
Used SharePoint Framework Version
||Joseph Velliah (SPRIDER, @sprider)
||October 20, 2018
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
Minimal Path to Awesome
- Clone this repository
- Open serve.json file under config folder. Update PageUrl to the URL of the list you wish to test.
- Move to folder where this readme exists
- In the command window run:
This project contains SharePoint Framework extensions that illustrates the following features:
- Command extension
- Office UI Fabric React
Notice. This sample is designed to be used in debug mode and does not contain automatic packaging setup for the “production” deployment.
I have created a SharePoint Framework WebPart using AngularJS 1.5.8 (not using TypeScript) which was working fine in workbench.html. However I have noticed that we get intermittent errors and WebPart failed to render when a user does things like refresh. We could reproduce this error in all the major browsers.
TypeError: s.bootstrap is not a function
TypeError: qa.fn is undefined
One thing is very clear from the error is that the angular related objects/modules are not recognized when the SPFx WebPart is trying to bootstrap. So I started analyzing the other components involved in the page and I could find the following
- More than one SPFx WebPart using angualr 1.5.8
- Initially I thought it might be an angular load timing/sequence issue and tried to reference angular in the page layout directly but no luck
- MS Engineer suggested to load JQuery latest version(2.X or 3.X) for custom actions but still I could not resolve the issue.
- I also tried to load the custom actions with JQuery noConflict() method
As we all aware angular uses the lite version of JQuery internally. If JQuery is not available in the page, angular.element delegates to AngularJS’s built-in subset of JQuery, called jqLite. I noticed the SPFx WebPart was loading in all the browsers consistently when custom actions with no JQuery or without custom actions on the page. This means the JQuery(any version) included in the custom action conflicts with the jqLite included in angular. This was the root cause.
Now I have 2 options
- Remove JQuery from custom actions
- Avoid JQuery Conflict in SPFX WebPart
As per the MS Engineer, The product group is looking at adding some documentation/samples to show how to do option 2. Let us wait for this update as we can not completely avoid JQuery in SharePoint Development.