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]