5

How can I force the SharePoint Framework to re-render the property panel of my Client Side Web Part?

In detail I would like to execute the getPropertyPaneConfiguration() method once again when the user performs a certain action which needs to update the rendered controls in the property panel.

2 Answers 2

7

You can do this by calling the refresh() method of the Property Pane which you can access through the web part's context property:

this.context.propertyPane.refresh();
1
  • Make sure to put it inside you async part...
    – Chris DS
    Nov 16, 2020 at 11:56
0

I had the same question and Waldek's answer didn't work twice for me, but this did:

this.context.propertyPane.close();
this.context.propertyPane.open();

Don't worry, there will be no visual feedback of the re-opening of the panel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.