React Multishare Command Extension with PnPJs
The sample is an custom action only active when multiple items are selected.
It uses multiple Office UI Fabric React components:
The action opens a dialog where the user can choose people from SharePoint in a people picker, to share the selected items with. It utilizes PnPJs to get suggestions for the peoplepicker, and for the sharing of the listitems.
Used SharePoint Framework Version
|react-command-share-pnpjs||Simon Ågren (@agrenpoint, simonagren GitHub, Sogeti)|
|2.0||Sept 19, 2018||Upgraded to 1.6. Made some additional code improvements.|
|1.0||June 14, 2017||Initial release|
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
- Move to folder where this readme exists
- In the command window run:
gulp serve --nobrowser
- Use following query parameter in the SharePoint site to get extension loaded without installing it to app catalog
Debug URL for testing
Here's a debug URL for testing around this sample.
Full URL to request would be something like following (Remember to open a modern List):
This project contains SharePoint Framework extensions that illustrates features:
- Command extension
- usage of Office UI Fabric React
- usage of PnPJs
Notice. This sample is designed to be used in debug mode and does not contain automatic packaging setup for the "production" deployment.
Building the code
git clone the repo npm i npm i -g gulp gulp
This package produces the following:
- lib/* - intermediate-stage commonjs build artifacts
- dist/* - the bundled script, along with other resources
- deploy/* - all resources which should be uploaded to a CDN.