Forum Discussion

Rod Merritt's avatar
Rod Merritt
Copper Contributor
Jun 05, 2018

PropertyPaneButton click event method in root component

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

  • Anonymous's avatar
    Anonymous

    Did you take a look at this?

    https://sharepoint.stackexchange.com/questions/222597/spfx-how-to-call-function-on-button-click-event-from-ts-file-with-react

    • Rod Merritt's avatar
      Rod Merritt
      Copper Contributor

      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. 

Resources