3

I am trying to develop a simple form using the new SharePoint Framework. The form requires PeoplePicker and TaxonomyPicker controls. I couldn't find any documentation on how to use these with the new framework?

4
  • Are you referring to the standard SharePoint PeoplePicker and TaxonomyPicker controls you would use for example in a Page Layout or a server-side Web Part? Sep 5, 2016 at 11:21
  • Also - related to Waldek's question - What form tech are you using, and how does it relate to SPFx? (We plan on doing work in this area, but I'm not aware of anything released to date) Sep 6, 2016 at 21:10
  • I suspect the question is not specifically SPFx, but rather, is there a PeoplePicker and TaxonomyPicker in the UI Fabric Components that can be used.
    – John Liu
    Sep 7, 2016 at 1:11
  • I am using Office UI Fabric React components for other controls. But, the PeoplePicker is not complete yet and there is no TaxonomyPicker control yet. Sep 8, 2016 at 0:16

2 Answers 2

1

You can use Taxonomy Picker and People picker as they are available as fully featured npm modules.

npm install @pnp/spfx-controls-react 

After successful installation, use the reference in your web part.

import { TaxonomyPicker, IPickerTerms } from "@pnp/spfx-controls-react/lib/TaxonomyPicker";

Add the control in form as :

<TaxonomyPicker
  allowMultipleSelections={true}
  termsetNameOrID="Countries"
  panelTitle="Select Term"
  label="Taxonomy Picker"
  context={this.props.context}
  onChange={this.onTaxPickerChange}
  isTermSetSelectable={false}
/>

Refernce MSDN

0

I was referring to using TaxonomyPicker and PeoplePicker client side controls with the new SharePoint Framework. I used the TaxonomyPicker control from Office Dev PnP and managed to get this working.

I had to,

  1. Get the typings for SharePoint JSOM
  2. Load the Office Dev PnP scripts using ModuleLoader
  3. Create a React Component as a wrapper around the TaxonomyPickerControl

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.