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:
DataTabledataTable = DataTable.create(); dataTable.addPlugin(EmptyStatePlugin.create(Icons.warning(), "No Data Available"));
T
The type of data in the DataTable.
See also :
public void EmptyStatePlugin(Icon<?> emptyStateIcon, String title)
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.
public static EmptyStatePlugin<T> create(Icon<?> emptyStateIcon, String title)
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.
A new EmptyStatePlugin instance.
public void onFooterAdded(DataTable<T> datatable)
datatable
The DataTable to which the footer is added.
public EmptyState getEmptyState()
The empty state element.
public EmptyStatePlugin<T> withEmptyState(ChildHandler<EmptyStatePlugin<T>, EmptyState> handler)
handler
The handler to customize the empty state.
This EmptyStatePlugin instance for method chaining.