0

I have created the SPfx project with React. I have used @pnp/sp": "^3.. for interaction with SharePoint. I can successfully get data from the SharePoint lists and Libraries. Now, I need to get SharePoint taxonomy terms and it's the parent term of that term. I have tried as per below documentation but not able to get data.

https://pnp.github.io/sp-dev-fx-controls-react/controls/TaxonomyPicker/

State.ts

import { IPickerTerms } from "@pnp/spfx-controls-react/lib/TaxonomyPicker";
export interface ISpfxStateState {
  terms?: IPickerTerms;
}

txs file

    import { TaxonomyPicker, IPickerTerms } from "@pnp/spfx-controls-react/lib/TaxonomyPicker";
<TaxonomyPicker allowMultipleSelections={true}
              termsetNameOrID="45d2cbfb-54cc-4619-8cc7-b3ee8d03f10a"
              panelTitle="Select Year"
              label="Year"
              context={this.props.context}
              onChange={this.onTaxonomyPickerChange}
              isTermSetSelectable={false} required />[enter image description here][1]
  • Can confirm this. Looks like a bug in the current version (i tried 3.10.0) – devil_inside Sep 09 '22 at 12:55
  • Looks like version 3.9.0 is working. But that version is not really nice together with spfx 1.15.2. Had to convert the context: context={(this.props.context as unknown)as BaseComponentContext} – devil_inside Sep 09 '22 at 13:19

1 Answers1

-1

I am also in the same boat as you actually. Trying to retrieve a term set and it never returns anything. The web part is just stuck loading forever.

  • Your answer would be better as a comment. – jfbloom22 Sep 13 '22 at 23:48
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 13 '22 at 23:51