-
Notifications
You must be signed in to change notification settings - Fork 6
sp webpart base.baseclientsidewebpart.canopenpopuponrender
Home > @microsoft/sp-webpart-base > BaseClientSideWebPart > canOpenPopupOnRender
This property indicates whether a web part can open a popup on initial render.
Signature:
protected get canOpenPopupOnRender(): boolean;
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.