sp webpart base.baseclientsidewebpart.ondisplaymodechanged - microsoft/Viva-Connections-Extensibility-Beta GitHub Wiki
Home > @microsoft/sp-webpart-base > BaseClientSideWebPart > onDisplayModeChanged
This event method is called when the display mode of a web part is changed.
Signature:
/** @virtual */
protected onDisplayModeChanged(oldDisplayMode: DisplayMode): void;| Parameter | Type | Description |
|---|---|---|
| oldDisplayMode | DisplayMode | The old display mode. |
Returns:
void
The default implementation of this API calls the web part render method to re-render the web part with the new display mode. If a web part developer does not want a full re-render to happen on display mode change, they can override this API and perform specific updates to the web part DOM to switch its display mode.