New in DataTables 3
While DataTables 3 is a major step forward for DataTables, the focus has not been on new features, but rather updates internally and the removal of jQuery as a dependency. As such, the main headlines of DataTables 3 are not UI, API or options related but rather:
- Removal of jQuery as a dependency. It will still work with jQuery as it did before, if you wish to continue to use it that way!
- TypeScript based. DataTables is now fully TypeScript and ESM based, built with
tscandrollup. - Updated internal parameters. The code base is now much more modern.
That said, there are a few new features that are worth highlighting below. For a detailed list of all new features, please see the release notes.
This page is part of a number of related documents detailing the release process for DataTables 3:
Grouped column search
Previously, DataTables had the ability to apply a search to all columns (a "global" search) or to individual columns. You didn't have the option of specifying a subset of columns to perform the search on. That is now possible in v3 through the search.columns option for the default search input or columns().search() via the API. With these methods, you can select any subset of columns to apply a single search term.
Furthermore, the fixed search methods (search.fixed() / columns().search.fixed()) which can be used to layer searches, and are particularly useful if you want to create a useable plugin for DataTables, now support the full range of search options that the standard search options also do, harmonising the search API.
ESM exports
DataTables now has a number of named exports in addition to its core default export:
Api- The DataTables API class.DataTable- Matches thedefaultexportDom- The DataTables DOM selection and manipulation libraryutil- DataTables' utility library
Note that these are all types (for if you are using TypeScript) and values.
Ajax options for language loading
DataTables has long since had the ability to load language strings by Ajax, but it has always been a simple GET request with no additional configuration options. The new language.ajax option in v3 now provides this ability. It can be given as a string, object or function, just the same as ajax, to allow customisation of the Ajax call.