keys.editor
Attach an Editor instance for Excel like editing.
Please note - this property requires the KeyTable extension for DataTables.
Description
Editor provides an inline editing option (inline()
) whereby a cell's content can be edited inside a table's cell. A natural extension of that is to use KeyTable to activate that inline editing to provide an Excel like interface to your end users.
This option provides that ability built into KeyTable - it will automatically handle the event listeners required for Editor and matches the behaviour of Excel as closely as possible (arrow keys for example will move the focus, rather than the editing cursor).
The key
event can be used to perform the same functionality as this option should you wish to implement your own event listeners to customise the key behaviour while editing (for example you may wish to disable KeyTable entirely, allowing the arrow keys to move the editing cursor rather than the cell focus).
Type
Default
- Value:
null
No Editor instance is automatically attached.
Example
Attach an Editor instance (editor
) to a table to provide Excel like editing:
new DataTable('#myTable', {
keys: {
editor: editor
}
});
Related
The following options are directly related and may also be useful in your application development.