sp-dev-fx-property-controls icon indicating copy to clipboard operation
sp-dev-fx-property-controls copied to clipboard

spfx 1.13 and PropertyFieldListPicker context

Open Link631 opened this issue 2 years ago • 3 comments

Category

  • [ ] Enhancement
  • [x] Bug
  • [ ] Question

Version

"@pnp/spfx-property-controls": "^3.6.0 spfx 1.13.1

Expected / Desired Behavior / Question

when using latest spfx with latest spfx property controls, it should be possible to pass the webpartContext property.

Observed Behavior

when using latest spfx with latest spfx property controls, following error appears, when I want to use the PropertyFieldListPicker: Type 'WebPartContext' is missing the following properties from type 'BaseComponentContext': _isServedFromLocalhost, isServedFromLocalhost

Do you have the same behaviour?

Thanks....

Link631 avatar Mar 20 '22 22:03 Link631

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

msftbot[bot] avatar Mar 20 '22 22:03 msftbot[bot]

Yeah we've noticed the same thing. Does 3.6 require a newer version of spfx? Should this be detailed in the docs?

EDIT: Hackaround - just pass this.context as any, bypassing the type safety check for that. Gets you working for now, but definitely needs sorting/documenting I think.

jimmywim avatar Mar 22 '22 14:03 jimmywim

Was discussed at #434.

milanholemans avatar Mar 22 '22 22:03 milanholemans