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

PeoplePicker not compatible with SharePoint 1.19? #1859

Open
EA12 opened this issue Aug 5, 2024 · 3 comments
Open

PeoplePicker not compatible with SharePoint 1.19? #1859

EA12 opened this issue Aug 5, 2024 · 3 comments

Comments

@EA12
Copy link

EA12 commented Aug 5, 2024

Category

[ ] Enhancement

[x ] Bug

[ ] Question

Version

@pnp/spfx-controls-react": "^3.18.1

Expected / Desired Behavior / Question

It should be possible to assign the context to the PeoplePicker like described in the documentation:
const peoplePickerContext: IPeoplePickerContext = { absoluteUrl: props.ctx.pageContext.web.absoluteUrl, msGraphClientFactory: props.ctx.msGraphClientFactory, spHttpClient: props.ctx.spHttpClient };

Observed Behavior

I get this message:
Type 'import("c:/Projekte/SPFx/AM/node_modules/@microsoft/sp-http-msgraph/dist/index-internal").MSGraphClientFactory' is not assignable to type 'import("c:/Projekte/SPFx/AM/node_modules/@pnp/spfx-controls-react/node_modules/@microsoft/sp-http-msgraph/dist/index-internal").MSGraphClientFactory'.
Types have separate declarations of a private property '_serviceScope'.ts(2322)
IPeoplePickerContext.d.ts(13, 5): The expected type comes from property 'msGraphClientFactory' which is declared here on type 'IPeoplePickerContext'
(property) IPeoplePickerContext.msGraphClientFactory: MSGraphClientFactory

Steps to Reproduce

Create a new SPFx-Solution (WebPart with React) and install the latest @pnp/spfx-controls-react which is currently "3.18.1"
Impelement a PeoplePicker like described in your documentation: https://pnp.github.io/sp-dev-fx-controls-react/controls/PeoplePicker/

If you verify sp-http-msgraph with
npm list @microsoft/sp-http-msgraph
you will see this:

├── @microsoft/[email protected] ├─┬ @microsoft/[email protected] │ └── @microsoft/[email protected] deduped └─┬ @pnp/[email protected] ├─┬ @microsoft/[email protected] │ └─┬ @microsoft/[email protected] │ └── @microsoft/[email protected] ├─┬ @microsoft/[email protected] │ └─┬ @microsoft/[email protected] │ └─┬ @microsoft/[email protected] │ └── @microsoft/[email protected]

From my package.json:

"dependencies": { "@fluentui/react": "8.106.4", "@microsoft/sp-core-library": "1.19.0", "@microsoft/sp-lodash-subset": "1.19.0", "@microsoft/sp-office-ui-fabric-core": "1.19.0", "@microsoft/sp-property-pane": "1.19.0", "@microsoft/sp-webpart-base": "1.19.0", "@microsoft/sp-http": "1.19.0", "@microsoft/sp-http-msgraph": "1.19.0", "@pnp/sp": "^4.3.0", "@pnp/spfx-controls-react": "^3.18.1", ...

So it seems that "@pnp/[email protected]" is using @microsoft/[email protected] and not version "1.19.0"
Can bring bring some light on this?

Thanks!

@EA12
Copy link
Author

EA12 commented Aug 7, 2024

It seems that you added the support for 1.19. into the latest beta version? like stated here - is that true? And when will that come to release version?

@EA12
Copy link
Author

EA12 commented Aug 15, 2024

I can confirm that it is working with the beta.
But when will this functionality come to a release version?

@michaelmaillot
Copy link
Collaborator

Hi @EA12,

3.19.0 has been released: https://www.npmjs.com/package/@pnp/spfx-controls-react/v/3.19.0

Can you give a try and confirm that it's working now on your 1.19.0 SPFx project?

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

No branches or pull requests

2 participants