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

sp webpart base.basewebpart.ondispose

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

Home > @microsoft/sp-webpart-base > BaseWebPart > onDispose

BaseWebPart.onDispose() method

This API should be used to refresh the contents of the PropertyPane. virtual

Signature:

protected onDispose(): void;

Returns:

void

Remarks

This API is called at the end of the web part lifecycle on a page. It should be used to dispose any local resources (i.e. DOM elements) that the web part is holding onto. This API is expected to be called in scenarios like page navigation i.e. the host is transitioning from one page to another and disposes the page that is being transitioned out.

Clone this wiki locally