1. Domino UI
  2. Data table
  3. Empty state
Top Basic Docs

Empty state

The EmptyStatePlugin class is a plugin for a DataTable that displays an empty state message when the table has no data.

This plugin provides an empty state message with an icon and a title, and it automatically shows the empty state when the table has no data rows and hides it when there is data available in the table.

Usage example:

 
 DataTable  dataTable = DataTable.create();
 dataTable.addPlugin(EmptyStatePlugin.create(Icons.warning(), "No Data Available"));
 

T

The type of data in the DataTable.

See also :

Examples

Empty state Show custom content when the table has no rows.

API Docs: EmptyStatePlugin

Constructors

public void EmptyStatePlugin(Icon<?> emptyStateIcon, String title)
Creates a new instance of EmptyStatePlugin with the provided icon and title.

emptyStateIcon

The icon to display in the empty state.

title

The title to display in the empty state.

Static methods

public static EmptyStatePlugin<T> create(Icon<?> emptyStateIcon, String title)
Creates and returns a new instance of EmptyStatePlugin with the provided icon and title.

T

The type of data in the DataTable.

emptyStateIcon

The icon to display in the empty state.

title

The title to display in the empty state.



Returns:

A new EmptyStatePlugin instance.

Public methods

public void onFooterAdded(DataTable<T> datatable)
Invoked when the footer is added to the DataTable.

datatable

The DataTable to which the footer is added.

public EmptyState getEmptyState()
Gets the empty state element.

Returns:

The empty state element.

public EmptyStatePlugin<T> withEmptyState(ChildHandler<EmptyStatePlugin<T>, EmptyState> handler)
Allows customizing the empty state using a handler.

handler

The handler to customize the empty state.



Returns:

This EmptyStatePlugin instance for method chaining.

We are a group of passionate people who love what we do

Donate & Support Us