Description
I searched but I could not find a request like this. If the requested functionality is already there please guide me how to implement it in a SPFX webpart.
Category
[x] Enhancement
[ ] Bug
[ ] Question
Version
Please specify what version of the library you are using: [ 3.21.0 ]
Expected / Desired Behavior / Question
If I want to provide the user to change the webpart title via the PnP Control and via webpart settings then when changed in the settings it wont reflect in the PnP Control. Would be nice if the changes would sync immediately.
Observed Behavior
I can change the title in the webpart settings and the changes are not reflected in the control
Steps to Reproduce
Create a simple SPFX Webpart and add a PropertyPaneTextField for a title property and the WebPartTitle PnP Control. Then change the title and see if the changes are in sync. Syncing changes to the property pane can be done via something like the following example code. But not the other way around.
/*
* Method is used by the PnP WebPartTitle Component as value for "updateProperty"
*/
private saveTitle(title?: string): void {
update(this.properties, "title", () => {
return title;
});
//Update the property pane to reflect changes
this.context.propertyPane.refresh();
}