sp-client-custom-fields
sp-client-custom-fields copied to clipboard
spfx 1.6.0 compatibility error (context field incompatible)
Greetings,
It looks like it's time to update @microsoft packages for 1.6.0 ("@microsoft/sp-webpart-base": "1.6.0"
) compatibility... IWebPartContext has changed.
Using PropertyFieldPicturePicker when i specify context i.e.:
PropertyFieldPicturePicker('id', {
...props,
context: this.context
})
I get the following error when serving.:
error TS2345: Argument of type '{ label: string; initialValue: string; readOnly: true; previewImage: true; allowedFileExtensions:...' is not assignable to parameter of type
'IPropertyFieldPicturePickerProps'.
[15:38:10] [tsc] Types of property 'context' are incompatible.
[15:38:10] [tsc] Type 'WebPartContext' is not assignable to type 'IWebPartContext'.[15:38:10] [tsc] Types of property 'httpClient' are incompatible.
[15:38:10] [tsc] Type 'HttpClient' is not assignable to type 'HttpClient'. Two different types with this name exist, but they are unrelated.
[15:38:10] [tsc] Types have separate declarations of a private property '_fetchProvider'.
Same issue for the new released SPFx 1.7.0
I found what I needed on the dev branch https://sharepoint.github.io/sp-dev-fx-property-controls/
npm i @pnp/spfx-property-controls@next -S
@berndverhofstadt could you describe how you updated the package.json
so it uses new references? I replaced package names and bumped versions but it was not good enough to make the linter happy.