Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaxonomyPicker continuously shows spinner instead of suggestion when typing and throw error in console #1748

Closed
kuralew opened this issue Jan 30, 2024 · 8 comments

Comments

@kuralew
Copy link

kuralew commented Jan 30, 2024

Category

[ ] Enhancement

[ x] Bug

[x ] Question

Version

Please specify what version of the library you are using: 3.16.2. In addition, if helps, am using
"@microsoft/sp-core-library": "1.17.4", "@microsoft/sp-lodash-subset": "1.17.4", "@microsoft/sp-office-ui-fabric-core": "1.17.4", "@microsoft/sp-property-pane": "1.17.4", "@microsoft/sp-webpart-base": "1.17.4", "react": "17.0.1", "react-dom": "17.0.1"

Expected / Desired Behavior / Question

TermSetPicker - suggestions should list available suggestions under input element.
TermSet and TermSetItems are correctlly displayed in Panel. I can select

Observed Behavior

After typing to see suggestions, it throws an error in the console (for every key stroke)
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'length') at TermPicker.<anonymous> (TermPicker.js:201:1) at step (TermPicker.js:47:1) at Object.next (TermPicker.js:28:45) at fulfilled (TermPicker.js:19:42)

I must also mention that i started seeing this issue after I upgrade SharePoint Framework from 1.10.0 to 1.17.4

Steps to Reproduce

<TaxonomyPicker context={props.context} allowMultipleSelections={true} initialValues={props.value ? props.value : []} panelTitle='Select Term' termsetNameOrID={termSetId} onChange={props.onChange} label={props.label ? props.label : ''} isTermSetSelectable={false} />

@ghost
Copy link

ghost commented Jan 30, 2024

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Jan 30, 2024
Copy link

Thank you for submitting your first issue to this project.

@NishkalankBezawada
Copy link
Contributor

Hello @kuralew

I have tried to reproduce the issue, but wasnt able to.

Could you try this with beta version, npm install @pnp/spfx-controls-react@next --save and let us know the behaviour.

Thanks,
Nishkalank Bezawada

@kuralew
Copy link
Author

kuralew commented Feb 1, 2024

@NishkalankBezawada I see the same issue with npm install @pnp/spfx-controls-react@next --save. However, V1.16.0 works.

@NishkalankBezawada
Copy link
Contributor

Hello @kuralew

Can you check if you are passing the termsetid or term group id?

//Nishkalank

@kuralew
Copy link
Author

kuralew commented Feb 12, 2024

@NishkalankBezawada sorry was away from work for couple of weeks. Yes I'm passing the termSetId as shown below. Just to clarify, the @pnp/spfx-controls-react": "^3.9.0 used to work with @microsoft/sp-core-library": "1.10.0 and react": "16.8.5. It stopped working with the above error when i upgraded to @microsoft/sp-core-library": "1.17.4 and react": "17.0.1. The code is the same. Only the libraries were upgraded. I would appreciate any direction.
<TaxonomyPicker context={props.context} allowMultipleSelections={props.multiple} initialValues={props.value ? props.value : []} panelTitle='Select Term' termsetNameOrID={termSetId} onChange={props.onChange} label={props.label ? props.label : ''} isTermSetSelectable={false} />

@michaelmaillot
Copy link
Collaborator

Hi @kuralew,

In order to better "catch" what's wrong in your context, I suggest you to clone the PnP Controls repo on your computer if possible, then follow the Minimal Path to Awesome, fill the required info in the ControlsTest webpart for the TaxonomyPicker and run the project locally.

Let us know if you found something that could explain why is it not working as expected.

@michaelmaillot
Copy link
Collaborator

Closing this as there's no feedback from issuer. Feel free to reopen it needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants