-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)sharepoint-developer-supportsharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.Confirmed bug, not working as designed / expected.type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Description
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
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
- Chrome 140.0.7339.81 (Official Build) (64-bit)
- 1.21.1
- 18.18.1
Describe the bug / error
When refreshing the page in Edit mode, render
is called before onInit
and theme changed event is being called multiple times. I think these issues are linked #10413
eval @ VM2488:1
render @ CustomWebPart.ts:93
i._internalHandleThemeChangedEvent @ sp-pages-assembly_en…0cc25137d4d7.js:299
(anonymous) @ sp-pages-assembly_en…00cc25137d4d7.js:23
e._raiseEventInternal @ sp-pages-assembly_en…00cc25137d4d7.js:23
e.raiseEvent @ sp-pages-assembly_en…00cc25137d4d7.js:23
e._raiseEvent @ sp-pages-assembly_en…0cc25137d4d7.js:275
e._setTheme @ sp-pages-assembly_en…0cc25137d4d7.js:275 // <------ this triggers theme changed event

Steps to reproduce
- Open page in Edit mode
- Refresh the page
render
method is called beforeonInit
completes
Expected behavior
render
is not called before onInit
.
Metadata
Metadata
Assignees
Labels
area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)sharepoint-developer-supportsharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.Confirmed bug, not working as designed / expected.type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.