{hero}

colvisRestore

Since: Buttons 1.0.0

Restore the visibility of column to their original state.
Please note - this property requires the Buttons extension for DataTables.

Description

This colvisRestore button type provides a single click button that will restore the visibility state of the columns to match that when the button was created. This works by reading the state as the button is created (which is generally during the initialisation of the table) and then restoring those values when activated by the end user.

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):

Example

DataTables initialisation: Show column visibility and restore buttons:

new DataTable('#myTable', {
	layout: {
		topStart: {
			buttons: ['colvis', 'colvisRestore']
		}
	}
});