Sp-dev-fx-controls-react: Type 'WebPartContext' is not assignable to type 'BaseComponentContext'.

Created on 26 Mar 2021  路  4Comments  路  Source: pnp/sp-dev-fx-controls-react

Category

[ ] Enhancement

[ ] Bug

[X] Question

Version

Please specify what version of the library you are using: [ 3.0.0 ]

Expected / Desired Behavior / Question

Before 3.0.0 the context={props.context} for FilePicker and ListItemPicker was OK with WebPartContext inherited from the context: this.context from the web part class.

Observed Behavior

After upgrade to 3.0.0 , TS complains that "Type 'WebPartContext' is not assignable to type 'BaseComponentContext'."

I am OK for now by using context={props.context as any}
But I would like to know the right way to do it.

Thanks for a great collection!

answered question

Most helpful comment

Thank you @Ofer-Gal for reporting this one.

v3 is based on SPFx v1.12 and up.

For SPFx v1.11 use the latest v2 release.

All 4 comments

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

Thank you @Ofer-Gal for reporting this one.

v3 is based on SPFx v1.12 and up.

For SPFx v1.11 use the latest v2 release.

Thank you

Hi @AJIXuMuK,
Version 1.12 has been deprecated https://docs.microsoft.com/en-us/sharepoint/dev/spfx/release-1.12.0.
Do you know if spfx controls will be to? For production releases, should we aim for 1.11/v2?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joelfmrodrigues picture joelfmrodrigues  路  4Comments

nviolero picture nviolero  路  4Comments

rabwill picture rabwill  路  4Comments

enti333 picture enti333  路  7Comments

AriGunawan picture AriGunawan  路  8Comments