You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me start by saying I don't know JavaScript very well. So I am going at this the best I can.
When calling onDeleteRow, all of the fields would return undefined. The callback provides valid element names but not data.
The problem lies here somewhere around row 574:
// Getting the IDs and Values of the tablerow
for (var i = 0; i < dt.context[0].aoColumns.length; i++) {
// .data is the attribute name, if any; .idx is the column index, so it should always exists
var name = dt.context[0].aoColumns[i].data ? dt.context[0].aoColumns[i].data :
dt.context[0].aoColumns[i].mData ? dt.context[0].aoColumns[i].mData :
dt.context[0].aoColumns[i].idx;
jsonDataArray[name] = adata.data()[0][name];
}
that.onDeleteRow(that,
jsonDataArray,
function(data){ that._deleteRowCallback(data); },
function(data){ that._errorCallback(data); }
);
I can see that the data is never pushed into jsonDataArray.
I got around this by changing
that.onDeleteRow(that,
jsonDataArray,
to
that.onDeleteRow(that,
adata.data()[0]
adata.data()[0] was at least mostly the right data that should be returned so I can use it in the onDeleteRow function.
Perhaps someone smarter than me can work out why the loop isnt working correctly?
For reference, add and edit work just fine. The delete model loads with all the correct data, its only submitting delete that I was having trouble.
The text was updated successfully, but these errors were encountered:
Let me start by saying I don't know JavaScript very well. So I am going at this the best I can.
When calling onDeleteRow, all of the fields would return undefined. The callback provides valid element names but not data.
The problem lies here somewhere around row 574:
I can see that the data is never pushed into jsonDataArray.
I got around this by changing
to
adata.data()[0] was at least mostly the right data that should be returned so I can use it in the onDeleteRow function.
Perhaps someone smarter than me can work out why the loop isnt working correctly?
For reference, add and edit work just fine. The delete model loads with all the correct data, its only submitting delete that I was having trouble.
The text was updated successfully, but these errors were encountered: