1. Domino UI
  2. Data table
  3. Header bar
Top Header Docs

Header bar

The HeaderBarPlugin class provides a customizable header bar for a DataTable with various actions such as condensing, expanding, toggling stripes, borders, hover effect, clearing filters, and showing/hiding columns.

Usage Example:

 
 HeaderBarPlugin  headerBar = new HeaderBarPlugin< >("My Table", "Description");
 headerBar.addActionElement(new HeaderBarPlugin.CondenseTableAction< >());
 headerBar.addActionElement(new HeaderBarPlugin.StripesTableAction< >());
 headerBar.addActionElement(new HeaderBarPlugin.BordersTableAction< >());
 headerBar.addActionElement(new HeaderBarPlugin.HoverTableAction< >());
 headerBar.addActionElement(new HeaderBarPlugin.ClearSearch< >());
 headerBar.addActionElement(new HeaderBarPlugin.SearchTableAction< >());
 headerBar.addActionElement(new HeaderBarPlugin.ShowHideColumnsAction< >());

 DataTable  dataTable = DataTable.create(data);
 dataTable.addPlugin(headerBar);
 

T

The data type of the DataTable

@deprecated use {@link NavigationBarPlugin}

Examples

Header bar Adds a title and description for the table, and allow adding elements to the top right side of the table

API Docs: HeaderBarPlugin

Constructors

public void HeaderBarPlugin(String title)
Creates a HeaderBarPlugin with the specified title and an empty description.

title

The title to be displayed in the header bar.

public void HeaderBarPlugin(String title, String description)
Creates a HeaderBarPlugin with the specified title and description.

title

The title to be displayed in the header bar.

description

The description to be displayed in the header bar.

Public methods

public void onBeforeAddTable(DataTable<T> dataTable)
Check super implementation documentation.

This method is called before adding the DataTable to the DOM. It adds the header bar and action elements to the DataTable.

dataTable

The DataTable to which the header bar and action elements will be added.

public HeaderBarPlugin<T> addActionElement(HeaderActionElement<T> headerActionElement)
Adds an action element to the header bar.

headerActionElement

The HeaderActionElement to be added to the header bar.



Returns:

This HeaderBarPlugin instance for method chaining.

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

Donate & Support Us