I have an inline remove and a select remove (for multiple records) to remove records. Removing records works fine (also editing as standalone).
In some instances instead of “removing” a or multiple record(s), I want to ‘update’ a value in one flow. I’ve tried to change the .mode() (https://editor.datatables.net/reference/api/mode()) and .set() the value, but I’m getting and error: Uncaught TypeError: d is undefined
How can I achieve the desired workflow?
// "Delete" record inline:
var delete_groups_inline = $('#groups').on('click', 'a.remove_groups', function (e) {
e.preventDefault();
var removeRow = $(this).closest('tr');
editor_groups.remove( removeRow, {
title: 'Remove Record',
message: 'Are you sure you want to remove this record?',
buttons: [{
label: 'Delete',
fn: function () { this.submit(); }
}]
})
.mode('edit')
.set( 'groups.status', 2 );
});
// "Delete" selected record(s):
{
extend: "remove",
editor: editor_groups,
text: 'Delete selected',
action: function ( e, dt, node, config ) {
var rows = table_groups.rows( '.selected' );
var rowIndexes = rows.indexes();
editor_groups.remove( rowIndexes, {
title: 'Remove Record',
message: 'Are you sure you want to remove this record?',
buttons: [{
label: 'Delete',
fn: function () { this.submit(); }
}]
})
.mode('edit')
.set( 'groups.status', 2 );
}
}
Error in both instances:
Uncaught TypeError: d is undefined
multiGet http://127.0.0.1/js/libs/dataTables.editor.min.js:24
_submit http://127.0.0.1/js/libs/dataTables.editor.min.js:99
each jQuery
_submit http://127.0.0.1/js/libs/dataTables.editor.min.js:99
each jQuery
_submit http://127.0.0.1/js/libs/dataTables.editor.min.js:99