React Data GridOverlays

Overlays are used for displaying messages over the top of the grid. There are two built-in overlays: loading and no-rows.

Loading overlay Copy Link

Show or hide the loading overlay by setting the loading property to true or false.

loadingCopy Link
boolean
Show or hide the loading overlay.

The loading overlay takes precedence over the no-rows overlay and is not dependent of the state of rowData.

No rows overlay Copy Link

When rowData is set to an empty array [], the grid automatically displays the no-rows overlay. The no-rows overlay can also be programmatically shown / hidden via the grid API.

showNoRowsOverlayCopy Link
Function
Show the no-rows overlay. If suppressNoRowsOverlay is set, or if loading is true, this will not do anything.
hideOverlayCopy Link
Function
Hide the no-rows overlay if it is showing.

The automatic displaying of the no-rows overlay can be suppressed by setting suppressNoRowsOverlay to true.

Initial loading overlay Copy Link

If loading is not explicitly defined, the grid will automatically show the loading overlay until both rowData and columnDefs are provided with a non-null value for the first time. This behaviour can be suppressed by initialising the grid with an appropriate loading state.

Customisation Copy Link

Overlays can be customised by providing either a HTML string or custom component via grid properties.

Custom Loading Overlay Copy Link

The loading overlay can be customised via the grid properties overlayLoadingTemplate or loadingOverlayComponent and loadingOverlayComponentParams.

overlayLoadingTemplateCopy Link
string
Provide a HTML string to override the default loading overlay. Supports non-empty plain text or HTML with a single root element.
loadingOverlayComponentCopy Link
Provide a custom loading overlay component.
loadingOverlayComponentParamsCopy Link
any
Customise the parameters provided to the loading overlay component.

This example demonstrates how to provide a custom loading overlay component customised via parameters.

Custom No Rows Overlay Copy Link

The no-rows overlay can be customised via the grid properties overlayNoRowsTemplate or noRowsOverlayComponent and noRowsOverlayComponentParams.

overlayNoRowsTemplateCopy Link
string
Provide a HTML string to override the default no-rows overlay. Supports non-empty plain text or HTML with a single root element.
noRowsOverlayComponentCopy Link
Provide a custom no rows overlay component.
noRowsOverlayComponentParamsCopy Link
any
Customise the parameters provided to the no-rows overlay component.

This example demonstrates how to provide a custom no-rows overlay component customised via parameters.