JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
<script src="http://www.datatables.net/release-datatables/examples/examples_support/jquery.jeditable.js"></script>
<link rel="stylesheet" href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css">
<table id="tabela">
<thead>
<tr>
<th>Usuario</th>
<th>E-mail</th>
<th>Senha</th>
<th>Ativo</th>
</tr>
</thead>
</table>
JavaScript
var row = {
"0": "foo",
"1": "foo@bar.com",
"2": "pwd",
"3": "yes",
}
$(document).ready(function() {
var tbl = $('#tabela').dataTable({
"aaData": [row, row],
"aoColumns": [
{"sClass": "center editable"},
{"sClass": "center"},
{"sClass": "center"},
{"sClass": "center"}],
"bPaginate": false,
"asStripeClasses": ['odd', 'even'],
"bFilter": false,
"fnDrawCallback": function (){
$('#tabela tbody td.editable').editable(function (value){
return (value);
},{
onblur: 'submit',
callback: function (value){
var aPos = tbl.fnGetPosition(this);
tbl.fnUpdate(value, aPos[0], aPos[1]);
}
});
}
});
//oTable.fnUpdate( {name: 'hardcoded'}, 0 ); // <--- Works
});