rowGroupClear
Remove any applied grouping from the table.
Please note - this property requires the ColumnControl extension for DataTables.
Description
The button added by this content type will remove any data grouping that has been applied to the table (either by rowGroup
and rowGroupAdd
, or by RowGroup directly). The table will automatically redraw to remove the row grouping when this button is triggered.
Please note that to operate this content type the RowGroup extension for DataTables is required.
Display
The button added by this control will display as a simple icon button at the top level, or as a button with icon and text in a dropdown. It is generally expected that it will be used in a dropdown to avoid cluttering the UI.
Options
This button can have the following options set in its configuration object to customise its actions and display, in addition to those options which are available for all buttons (e.g. buttons.buttons.text
):
icon
- Type:
string
- Default:
groupClear
Button icon. Can take the name of any icon available in DataTable.ColumnControl.icons
(which is a writeable object containing SVG icons).
text
- Type:
string
- Default:
Clear all grouping
Trigger button text (shown when in a dropdown). Can also be set by the rowGroupClear
key of language.columnControl
, which will take priority if set.
Example
Show a dropdown with all row grouping control buttons.:
new DataTable('#example', {
columnControl: ['order', ['rowGroup', 'rowGroupAdd', 'rowGroupRemove', 'rowGroupClear']],
ordering: {
indicators: false,
handler: false
}
});