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

sp webpart base.baseclientsidewebpart.onafterresize

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

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

BaseClientSideWebPart.onAfterResize() method

This API is invoked when the web part container dom element width is changed, e.g. when the browser browser window is resized and when the property pane is toggled open/closed.

Signature:

/** @virtual */
protected onAfterResize(newWidth: number): void;

Parameters

Parameter Type Description
newWidth number Width (in pixels) of the container for the web part after the resize event.

Returns:

void

Remarks

Web parts should utilize this method to perform operations such as potentially re-rendering components based on the new available width for the web part.

Clone this wiki locally