table
Since: Editor 1.3
The DataTable that Editor will operate on.
Please note - this property requires the Editor extension for DataTables.
Description
To have Editor operate as an editor for DataTables, it needs to be able to identify which DataTable it should operate on. This option provides that ability.
Note on backwards compatibility
Editor 1.2- provided domTable as the option for how to configure Editor to operate with a DataTable. This parameter has been renamed to be simply table in Editor 1.3, as a simplification. This change is fully backwards compatible, as Editor will this recognise the domTable option, but it recommends that this newer option is used in preference.
Type
string|DataTable.Api|node|jQuery|function|object
The DataTable this instance of Editor should operate on. This can be:
string- A jQuery selector that will identify the table (e.g.#myTable).DataTable.Api- A DataTables API instance for the DataTablenode- ThetableDOM nodejQuery- A jQuery object that contains the table.function(since 3.1) - A function that will resolve to the DataTabletableor Api instance.object(since 3.1) - A React, Vue or Angular reference object which references the host DataTable.
Example
Basic initialisation with an Ajax endpoint specified:
const editor = new DataTable.Editor({
ajax: '/api/staff',
table: '#myTable',
fields: [
// ...
]
});