{hero}

autoFill.focus

Since: AutoFill 2.0.0

Action that will cause the auto fill drag handle to appear in a cell.
Please note - this property requires the AutoFill extension for DataTables.

Description

The click-to-drag auto fill drag handle can be attached to the table cells using a number of different methods, depending on how you wish the end user to interact with your table. This option provides the ability to switch between the various options which are detailed below.

Type

string

Description:

Action that will cause the drag handle to appear in a cell. It can be one of:

  • click - Display when a cell is clicked upon
  • focus - Display when a cell gains focus - for integration with KeyTable
  • hover - Display when a cell is hovered over
  • null - Automatic detection - focus if KeyTable is enabled on a table and hover otherwise.

Default

  • Value: null

If KeyTable is also initialised on the host table the focus option will be used. Otherwise hover is used.

Example

Automatically focus on the first cell in the table:

new DataTable('#myTable', {
	autoFill: {
		focus: 'click'
	}
});