KeyTable inline editing + submit on blur
KeyTable inline editing + submit on blur
I have a table which I navigate on using keyTable with inline editing.
editor = new $.fn.dataTable.Editor({
formOptions: {
inline: {
submit: 'allIfChanged'
}
},
...
...
let table = $('#datatable').DataTable({
...
keys: {
editor: editor,
// editOnFocus: true
},
When I activate the 'editOnFocus' option then I enter into inline editing on each cell, but when I blur out, it submits only on the first cell.
When I turn the option off, it will submit on each blur. (but I don't get the inline editing on focus, which I want).
I'm not sure if it's a bug or a bad configuration.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I just tried it here, and it seems to be behaving as expected - the submits happen on all columns, not just the first. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Cheers,
Colin
Thanks for answering. Indeed it works well on your example. I am going to check and compare..
The only difference between my page and your example, is that I am using ajax to populate the data.
When I remove the ajax part and use an already populated table it works.
When I restore the ajax part then a POST request on submit is sent only for the first cell, for the next it doesn't.
My use case is different but maybe it is worth a try adding an additional form option?!
Like in here: https://datatables.net/forums/discussion/62123
The Ajax shouldn't make any different. What version of the software are you using? The debugger will be able to tell you.
Beyond that, I think we'd need a link to your page to see and debug the issue, since it isn't reproducible in Colin's example.
Thanks,
Allan
Sure. I'll send a link and password in a private message.
Thank you !