Open ynot3363 opened 1 month ago
SharePoint Online
💥 SharePoint Framework
Windows
The onBeforeSerialize method appears to constantly be called when the SharePoint page is simply in Edit Mode but no changes are being made.
Here is a sample repo to reproduce the error: https://github.com/ynot3363/onBeforeSerializeIssue
Here is the method I implemented to test: protected override onBeforeSerialize(): void { console.log(new Date().toLocaleString()); }
protected override onBeforeSerialize(): void { console.log(new Date().toLocaleString()); }
I expect this method to only be called when properties are changed and/or the page is being saved.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/integrate-web-part-properties-with-sharepoint
https://learn.microsoft.com/en-us/javascript/api/sp-webpart-base/basewebpart?view=sp-typescript-latest#@microsoft-sp-webpart-base-basewebpart-onbeforeserialize-member(1)
Hi, any update on this issue?
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
The onBeforeSerialize method appears to constantly be called when the SharePoint page is simply in Edit Mode but no changes are being made.
Here is a sample repo to reproduce the error: https://github.com/ynot3363/onBeforeSerializeIssue
Here is the method I implemented to test:
protected override onBeforeSerialize(): void { console.log(new Date().toLocaleString()); }
Steps to reproduce
Expected behavior
I expect this method to only be called when properties are changed and/or the page is being saved.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/integrate-web-part-properties-with-sharepoint
https://learn.microsoft.com/en-us/javascript/api/sp-webpart-base/basewebpart?view=sp-typescript-latest#@microsoft-sp-webpart-base-basewebpart-onbeforeserialize-member(1)