sp-dev-fx-property-controls
sp-dev-fx-property-controls copied to clipboard
spfx 1.13 and PropertyFieldListPicker context
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....
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
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.
Was discussed at #434.