Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp webpart base.baseclientsidewebpart.canopenpopuponrender

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-webpart-base > BaseClientSideWebPart > canOpenPopupOnRender

BaseClientSideWebPart.canOpenPopupOnRender property

This property indicates whether a web part can open a popup on initial render.

Signature:

protected get canOpenPopupOnRender(): boolean;

Remarks

In some environments the host re-renders the web parts frequently, and therefore opening popups during render will cause popups to open repeatedly, which is a poor user experience. As an example, the classic SharePoint pages perform postbacks causing the page to re-render on all button clicks.

If a web part needs to open a popup on render, it should use this API before opening the popup. If this API returns false, the web part should not open popup on initial render. Some web parts that open popups during render are the document embed web part that pops up the file picker on initial render, embedded video web part that pops up the PropertyPane on initial render.

Clone this wiki locally