IClientSideWebPartStatusRenderer interface

Interface to be implemented by a component that should display the loading indicator and error messages for a web part.

Methods

clearError(domElement)

Clear the webpart error message.

clearLoadingIndicator(domElement)

Clear the loading indicator.

displayLoadingIndicator(domElement, loadingMessage, timeout)

Display a loading spinner.

renderError(domElement, error)

Render the provided error message in the webpart container div.

Method Details

clearError(domElement)

Clear the webpart error message.

clearError(domElement: HTMLElement): void;

Parameters

domElement
HTMLElement

the web part container div.

Returns

void

clearLoadingIndicator(domElement)

Clear the loading indicator.

clearLoadingIndicator(domElement: Element): void;

Parameters

domElement
Element

the web part container div.

Returns

void

displayLoadingIndicator(domElement, loadingMessage, timeout)

Display a loading spinner.

displayLoadingIndicator(domElement: Element, loadingMessage: string, timeout?: number): void;

Parameters

domElement
Element

the web part container div.

loadingMessage
string

the message to be displayed when the loading spinner id displayed.

timeout
number

timeout to render the loading indicator. Default is 1500ms.

Returns

void

renderError(domElement, error)

Render the provided error message in the webpart container div.

renderError(domElement: HTMLElement, error: Error | string): void;

Parameters

domElement
HTMLElement

the web part container div.

error
Error | string

the error message.

Returns

void