Submit type 'changed' breaks local table editing
Submit type 'changed' breaks local table editing
When no ajax
option is configured in Editor 1.6.0, the editor directly updates the table from the submitted form data. This behavior is broken when the form is configured to only submit changed properties.
The behavior should be changed to look up the previous value in the table and then override its existing values with the submitted form values (using $.extend
). This works with all types of submit options: all, allIfChanged or changed.
This issue is very much related to another recent discussion: https://datatables.net/forums/discussion/32838/inline-edit-server-response-for-one-field-only#latest
Replies
That is what should be happening. Could you give me a link to the page showing the issue please? It would also be worth updating to 1.6.1 which fixed a bug in this area (although not directly that I don't think).
Allan
I can't show a page that has the issue because our web app is an intranet site. The problem looks fixed in 1.6.1 though!
Example given the following unmodified row:
The issue that I had was easily visible in the
postSubmit
event.If I change the
position
field and submit then thedata
is an object that looks like this:In Editor 1.6.0, the returned
json
was not the full object.In Editor 1.6.1, the returned
json
is correct: the unmodified row is patched using the submitted dataSo I don't know if you intended to fix it or if it's a lucky side effect of a different change, but I'm happy knowing that it's fixed in the newest version.
Yup - that was the intended fix. The bug that I found relating to that was if
idSrc
was set the data wasn't being correctly read, so I rewrote that section of code to make it behave as expected.Good to hear that 1.6.1 does the business for you.
Allan