Adding rows in local table editor
Adding rows in local table editor
sliekens
Posts: 97Questions: 17Answers: 2
Adding rows to a table without ajax configured does not work in Editor 1.6.1
https://editor.datatables.net/examples/simple/noAjax.html
The following statement throws because there is no original data to extend.
// Get the original row's data, so we can modify it with new values.
// This allows Editor to not need to submit all fields
var rowData = originalData[ key ].data;
Uncaught TypeError: Cannot read property 'data' of undefined
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Darn - that was daft of me. Sorry about that.
The function should be:
That will be in Editor 1.6.2.
Thanks for letting me know about this!
Allan
Glad I could help. Thanks for the fix.
(one of the code comments is still wrong, by the way)
Does
_submitTable
execute before or afterpreSubmit
? In the latter case, it would be prudent to only create a new id ifpreSubmit
didn't already create one.It executes after
preSubmit
.What you suggest sounds eminently sensible to me - thanks! I'll also get that in for 1.6.2.
Allan