Intercept property pane field changes on dynamaically loaded webparts

%3CLINGO-SUB%20id%3D%22lingo-sub-1802639%22%20slang%3D%22en-US%22%3EIntercept%20property%20pane%20field%20changes%20on%20dynamaically%20loaded%20webparts%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1802639%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20SharePoint%20SPFx%20webpart%20and%20I%20am%20trying%20to%20load%20and%20render%20OOB%20webparts%20dynamically%20from%20within%20my%20webpart.%20I%20am%20looking%20at%20this%20example%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.techmikael.com%2F2018%2F06%2Fdynamically-load-web-part-from-another.html%22%20rel%3D%22nofollow%20noreferrer%20noopener%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fwww.techmikael.com%2F2018%2F06%2Fdynamically-load-web-part-from-another.html%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20successfully%20loaded%20webparts%20like%20this%2C%20propertyPane%20is%20opened%20by%20default%20and%20I%20can%20configure%20the%20webparts.%20The%20problem%20is%20that%20I%20cannot%20find%20a%20way%20to%20intercept%20an%20event%20when%20properties%20are%20changed%2C%20in%20order%20to%20store%20the%20custom%20configuration.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20intercept%20property%20pane%20field%20changes%20on%20a%20dynamically%20loaded%20webpart%3F%20Could%20I%20register%20an%20event%20somehow%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Visitor

I have a SharePoint SPFx webpart and I am trying to load and render OOB webparts dynamically from within my webpart. I am looking at this example: https://www.techmikael.com/2018/06/dynamically-load-web-part-from-another.html

I successfully loaded webparts like this, propertyPane is opened by default and I can configure the webparts. The problem is that I cannot find a way to intercept an event when properties are changed, in order to store the custom configuration.

Is there a way to intercept property pane field changes on a dynamically loaded webpart? Could I register an event somehow?

0 Replies