Is it possible to override savePage method on click Save and Close button from SPFX

Occasional Contributor

I have a modern page with custom spfx webparts. My spfx webparts contains office ui fabric react components such as PeoplePicker and TaxonomyPicker.

After user enters the data and clicks save or save and close button, I need to override the event handler for Save event to save the information into the page. My idea is that I should override that Save event handler method so that my webpart callback handler will be called and updates the Page ListItem metadata. I also found onDisplayModeChanged event in the webpart from here, I am not sure how to find if the event is Save and close or Discard Changes.

Can anyone please suggest which is the elegant way to do that?

1 Reply

@Aruna Gottimukkala I am looking for same things. Did you found any solution or work around for that?