spacer
Provide a visual separation between content types.
Please note - this property requires the ColumnControl extension for DataTables.
Description
If you have a lot of options in ColumnControl it can be a good idea to provide visual separation between like types, grouping them together to make navigation easier for the end user. For example, ordering options and search are distinct actions and can benefit from grouping. You will see this pattern used a lot in desktop computer programs and operating systems.
This content type adds an element to the content list that is styled to provide that separation.
Display
At the top level of ColumnControl, this content type will display as a vertical bar. Inside a dropdown, it will display as a horizontal line spanning the width of the dropdown.
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
):
className
- Type:
string
- Default:
dtcc-spacer
Class name applied to the display element.
Example
Show an ordering icon and column click and drag icon in each header cell.:
new DataTable('#example', {
columnControl: ['order', 'spacer', ['orderAsc', 'orderDesc', 'spacer', 'search']],
ordering: {
indicators: false,
handler: false
}
});