Bug #4301: After updating an element in the datatable update the checkbox input

This commit is contained in:
Daniel Molina committed 2016-02-17 17:44:58 +01:00
1 parent 449313f893
commit a3dbf0ab56
1 file changed
+6 -1
@@ -502,8 +502,13 @@ define(function(require) {
$.each(that.dataTable.fnGetData(), function(index, aData) {
if (aData[that.selectOptions.id_index] === elementId) {
element[0] = aData[0];
var nodes = that.dataTable.fnGetNodes();
var checkId = '#' + that.resource.toLowerCase() + '_' + elementId;
var checkVal = $(checkId, nodes).prop('checked');
that.dataTable.fnUpdate(element, index, undefined, false);
if (checkVal) {
$(checkId, nodes).prop('checked', checkVal);
}
that.recountCheckboxes();
return false;
}