sp-dev-fx-webparts/README.md

3.6 KiB

React-PPP-PnP-Controls

Applies to

Get your own free development tenant by subscribing to Microsoft 365 developer program

Compatibility

Compatible with SharePoint Online Does not work with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Hosted Workbench Compatible

Summary

The React-PPP-PnP-Controls sample showcases the use of the Property Pane Portal to display the PnP SPFx React controls (version 3.7.0) in the SPFx Property Pane.

We are NOT using the SPFx Property Controls, that's the point of the sample.

React-PPP-PnP-Controls-Sample

Used SharePoint Framework Version

1.15.0.beta

Solution

Solution Author(s)
React-PPP-PnP-Controls Christophe Humbert

Version history

Version Date Comments
0.1.0 March 20, 2022

Disclaimer

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
  • Ensure that you are at the solution folder
  • in the command-line run:
    • npm install
    • gulp serve

Features

This sample showcases the use of the Property Pane Portal NPM module. It allows us to use PnP SPFx React controls in the Property Pane, without the need to build custom property controls.

The Property Pane Portal module includes:

  • The PropertyPaneHost function, which creates placeholders in the Property Pane
  • The PropertyPanePortal component, which leverages React Portals to teleport React components to the Property Pane.

Implemented controls:

  • Location Picker
  • People Picker
  • List Picker and List Item Picker (cascading selection)

There's a minor issue with the Location Picker of the SPFx React Controls library in v3.7.0, it'll be addressed in the next release.

References