Closed IRRDC closed 10 months ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Also happens in the PropertyControlsTestWebPart from this repository.
One of the reasons for the bug is this change: https://github.com/pnp/sp-dev-fx-property-controls/commit/46edef633bf6f5c628b96c1c3d44933c85be6987#diff-162be79c6bc5b46836132ba0090fc8c213f7d20933388840100ba07b547164d9 where _onChanged gets assigend to onChange which comes with 2 parameters instead of one, so changing the signature of _onChanged to include the parameter will store the result again. Strangely that doesn't fix the problem of displaying the selected choice on re-rendering yet.
private _onChanged(ev?: React.FormEvent<HTMLElement | HTMLInputElement>, option?: IChoiceGroupOption): void {
if (this._onChangeCallback) {
this._onChangeCallback(this.targetProperty, option.key);
}
}
Does an error of this severity warrant a 3.15.1 release since it renders the PropertyFieldChoiceGroupWithCallout control unusable and may destroy existing web part configurations?
@IRRDC many thanks for all the info, we are discussing it and will try to resolve it as soon as we have the chance. In the meantime, I suggest you keep using the previous version if possible.
Noticed the same issue today, rolling back in version fixed it for now
Thanks for reporting the issue. It has been fixed and version 3.15.1 has been release.
Category
Version
Please specify what version of the library you are using: [3.15.0]
Expected / Desired Behavior / Question
In the newest version the property assigned to the PropertyFieldChoiceGroupWithCallout gets deleted when a selection gets checked.
Observed Behavior
The current value does not get selected on load (anymore). It does show up when looking at it using the PropertyPanePropertyEditor. As soon as one of the options gets checked the whole property vanishes from the PropertyPanePropertyEditor.
Steps to Reproduce
I created a fresh SPFX webpart using yo and just added the sample codes from https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyPanePropertyEditor/ and https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyFieldChoiceGroupWithCallout/ I also added "choiceGroupWithCalloutValue": "Android" to the manifest.json to create a default value.
Sample code:
No choice selected on load:
Property exists before making a choice:
Property is gone after making a choice: