-
Notifications
You must be signed in to change notification settings - Fork 380
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 context type mismatch with SPFx 1.16.1 #1427
Comments
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible. |
Hello, I am building my project from multiple PnP components (e.g., SPFX Controls react + PnP Modern Search Extensibility). It is a pity to search for the matching version of SPFx for all components + I cannot upgrade own solution till all components got updated. Thanks |
We will update to 1.16.1 in the next release to have proper typings. |
Perfect! Thanks for the update 🚀 |
👍 Thank you for everything you and other guys do for the community. [off-topic] (I take advantage of having @AJIXuMuK here, thanks) No complains, just want to point out: the situation with dependencies and upgrades might be tricky and time consuming in scenarios, where there are multiple libraries used (community & own) for a solution. (those issues usually starting with typings issues e.g. |
Because using Something like : <PeoplePicker
{...props}
defaultSelectedUsers={value}
context={context as unknown as IPeoplePickerProps['context']}
/> This way, it will compiles whatever the version of SPFX your project is. Globally, I agree with @salascz. In large project SPFX dependencies are a pain to deal with. |
I upgraded to 3.13.0 and I'm still getting the Typescript error. Am I missing something? I don't see any changes to the context Type in the IPeoplePicker.ts file. It's still Thanks |
Category
[ ] Enhancement
[X] Bug
[ ] Question
Version
Please specify what version of the library you are using: [ 3.12.0 ]
Expected / Desired Behavior / Question
The desired behavior is to be able to use the context object Microsoft provides.
Observed Behavior
I am using a PeoplePicker in a Form Customizer extension.
When you try to simply use the context object you get the following error:
Steps to Reproduce
With a Form Customizer extension, the context object is a different type: 'FormCustomizerContext'
Using SPFx v1.16.0, I could declare the context property as this context object without issue.
However, using SPFx v1.16.1, you cannot use the same object without getting a type mismatch error.
Even though the the type is different, I didn't experience an error using SPFx 1.16.0 or earlier.
You can eliminate the error by casting the type as 'any', but I'm unsure if that is the correct way to solve this issue.
Someone else has also experienced a similar context type mismatch with FilePicker when upgrading to 1.16.1
Issue #1426
Thank you!
The text was updated successfully, but these errors were encountered: