git-subtree-dir: samples/react-ppp-pnp-controls git-subtree-mainline: 56cc34330fa4df6cf9efee8ad4d33f4ab3f12ab1 git-subtree-split: b1105e2c434bc5a5514761f5094ea324c84261a0
React-PPP-PnP-Controls
Applies to
Get your own free development tenant by subscribing to Microsoft 365 developer program
Compatibility
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.
Used SharePoint Framework Version
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)
Known Issues
There are a couple minor issues with the Location Picker of the SPFx React Controls library. I am working with the authors to get them addressed in the next release. In the meantime, be aware that:
- the control will overflow its container width if the address is too long
- the control doesn't work on the root site
References
- Getting started with SharePoint Framework
- Building for Microsoft teams
- Use Microsoft Graph in your solution
- Publish SharePoint Framework applications to the Marketplace
- Microsoft 365 Patterns and Practices - Guidance, tooling, samples and open-source controls for your Microsoft 365 development