Ephemer:reactive-datatables inline editor


#1

Hi,

Id like to ask if anyone can give an example of inline-editing for datatables using ephemer:reactive-datatables? I already tried the following:

var ajax_data = [{ date:"09/14/2015", _id:"KXqbqGXcYqpKFBCQS"}, { date:"09/14/2015",  _id:"THH9ZcNEQPhGT2fDD"}];

var editor = new $.fn.dataTable.Editor( {
    ajax:  ajax_data,
    table: '#t_jquery',
    fields: [
        {
           "label": "Date",
           "name": "date"
        },
        {
           "label": "ID",
           "name": "_id"
        }
     ]
    } );

var table = $('#t_jquery').DataTable( {
    dom: 'Bfrtip',
    ajax: ajax_data,
    columns: [
        {
           "data": "date"
        },
        {
           "data": "_id"
        }
    ],
    select: true,
    lengthChange: false,
    buttons: [
        { extend: 'create', editor: editor },
        { extend: 'edit',   editor: editor },
        { extend: 'remove', editor: editor }
    ]
} );