{hero}

search

Since: DataTables 2.0

Global search input.

Description

This feature displays a global search input next to a DataTable, letting the end user enter simple text search terms. The search behaviour can be customized with the search object.

The search feature can be disabled completely using the searching option or by excluding it from the layout options (which is the preferred method as of DataTables 2).

Examples

Disable search input with default layout:

new DataTable('#myTable', {
	layout: {
		topEnd: null
	}
});

Show search input top left:

new DataTable('#myTable', {
	layout: {
		topStart: 'search',
		topEnd: null
	}
});

Show search input with options:

new DataTable('#myTable', {
	layout: {
		topEnd: {
			search: {
				placeholder: 'Search here...'
			}
		}
	}
});

Related

The following options are directly related and may also be useful in your application development.