T - the type of the datatable recordspublic interface DataTablePlugin<T> extends TableEventListener
the methods in this interface are all hood methods that will be called on specific places while building the data table
| Modifier and Type | Method and Description |
|---|---|
default Optional<List<elemental2.dom.HTMLElement>> |
getUtilityElements(DataTable<T> dataTable,
CellRenderer.CellInfo<T> cellInfo) |
default void |
handleEvent(TableEvent event) |
default void |
init(DataTable<T> dataTable)
this method is used to initialise the plugin with the datatable instance
|
default void |
onAfterAddHeaders(DataTable<T> dataTable)
This method will be called right after adding all columns headers elements to the table
|
default void |
onAfterAddTable(DataTable<T> dataTable)
This method will be called right after adding the table element to its root element
|
default void |
onAllRowsAdded(DataTable<T> dataTable)
This method will be called right after all rows are added to the table
|
default void |
onBeforeAddHeaders(DataTable<T> dataTable)
This method will be called right before adding all columns headers elements to the table
|
default void |
onBeforeAddRow(DataTable<T> dataTable,
TableRow<T> tableRow)
This method will be called right before adding a row to the table
|
default void |
onBeforeAddTable(DataTable<T> dataTable)
This well be called once the table is initialized and before it is appended to the dom
|
default void |
onBodyAdded(DataTable<T> dataTable)
This method will be called right after adding body element to the table
|
default void |
onHeaderAdded(DataTable<T> dataTable,
ColumnConfig<T> column)
This method will be called right after adding a column header element to the table
|
default void |
onRowAdded(DataTable<T> dataTable,
TableRow<T> tableRow)
This method will be called right after adding a row to the table
|
default boolean |
requiresUtilityColumn() |
default void init(DataTable<T> dataTable)
dataTable - the DataTable we are attaching this plugin to.default void onBeforeAddTable(DataTable<T> dataTable)
dataTable - the DataTable we are attaching this plugin to.default void onBeforeAddHeaders(DataTable<T> dataTable)
dataTable - the DataTable we are attaching this plugin to.default void onAfterAddHeaders(DataTable<T> dataTable)
dataTable - the DataTable we are attaching this plugin to.default void onHeaderAdded(DataTable<T> dataTable, ColumnConfig<T> column)
dataTable - the DataTable we are attaching this plugin to.column - the ColumnConfig of the column we added the header for.default void onBodyAdded(DataTable<T> dataTable)
dataTable - the DataTable we are attaching this plugin to.default void onBeforeAddRow(DataTable<T> dataTable, TableRow<T> tableRow)
default void onRowAdded(DataTable<T> dataTable, TableRow<T> tableRow)
default void onAllRowsAdded(DataTable<T> dataTable)
dataTable - the DataTable we are attaching this plugin to.default void onAfterAddTable(DataTable<T> dataTable)
dataTable - the DataTable we are attaching this plugin to.default void handleEvent(TableEvent event)
handleEvent in interface TableEventListenerevent - the TableEvent being receiveddefault boolean requiresUtilityColumn()
default Optional<List<elemental2.dom.HTMLElement>> getUtilityElements(DataTable<T> dataTable, CellRenderer.CellInfo<T> cellInfo)
dataTable - DataTablecellInfo - CellRenderer.CellInfoOptional List of HTMLElements to be used as part of
the plugins utility column, elements returned from this method will be rendered as flex
items inside the utility cell.Copyright © 2019–2022 Dominokit. All rights reserved.