key-return-submit
Return key was used to submit an Editor inline edit.
Please note - this property requires the KeyTable extension for DataTables.
Description
The key-return-submit
event is triggered if KeyTable is controlling inline editing for Editor and the end user submits the form by pressing the enter key. It is not activated when the form is initially placed into edit mode if done so by using the enter key.
This can be used to perform an action on the table after the submission is complete, such as moving the KeyTable focus to act more like Excel.
Type
function function( e, datatable, cell )
- Parameters:
Name Type Optional 1 e
No jQuery event object
2 datatable
No DataTable API instance for the table in question
3 cell
No A DataTables API instance that contains the cell that was focused (
cell()
)
Example
Move focus to the right after a return key submit:
var table = new DataTable('#myTable', {
keys: true
});
table.on('key-return-submit', function (e, datatable, cell) {
table.keys.move('right');
});
Related
The following options are directly related and may also be useful in your application development.