Description
Category
- Question
- Typo
- Additional article idea
Question
I am observing lazy loading of custom web parts in modern pages. A web part is not loaded/rendered until it is scrolled to. This was observed in both Targeted and Standard release tenants starting Jul 18. See snapshot of elements rendered of a HelloWorld webpart upon initial page load and then after it is scrolled into view.
My question: is there a way to override this behavior (either thru PS or even within spfx code) to render all webparts on page load?
My use case for this is in using dynamic data source web parts where the data source web part is at the bottom of a large page, while my destination/receiving web part is at the top. (Example: a navigation menu of various web parts in the page). Since the source is not rendered yet at the bottom, the top web part does not have any data coming from the source web parts.
Prior to Jul 18, all web parts were renderd on page load, so my consumer web part was able to get all data from the source/publisher web parts at the bottom of the page.
Environment details (development & target environment)
- Your Developer Environment: Windows 10
- Target Environment: SharePoint Online (Targeted and Standard release tenants)
- Framework: Node.js v6/v8/v10/v12]
- Browser(s): All
- Tooling: VS Code , SPFx v1.10.0
- Additional details:
This was not observed prior to Jul 18. After Jul 18, the web parts are being wrapped around a <div data-viewport-id tag.