PropertyPaneButton click event method in root component

Copper Contributor

I want to call the method that's in my root component in SPFx for a button click in the property pane. Is this possible?

 

How do I go from .ts file to a method in the .tsx file?

2 Replies

I decided to put the button into the component and then have a toggle switch in the property pane that shows/hides the section with my button.