Datatable - Editor : setting editOnfocus option posting data to server randomly
Datatable - Editor : setting editOnfocus option posting data to server randomly
Saira
Posts: 7Questions: 3Answers: 0
Hi,
We have to open the editor on focus but post data to server only when user makes some changes or type in the field. We are able to achieve this feature with **editOnFocus ** option but data is being posted randomly to server while only navigating the table and making no change.
We observed the same behavior on tabbed column example screen, on reaching the 3rd row it submit few next columns and rest works fine.
This discussion has been closed.
Answers
Can you possibly give me instructions on how to recreate the issue on that page please? I've tried focusing on the "Airi" cell and then just tabbing through the table, but wasn't able to reproduce the issue.
Thanks,
Allan
I changed the column in that row and left it blank on tabbed column screen.
I'm really sorry, but I don't quite understand. Could you give me explicit step by step instructions please?
Thanks,
Allan
We encountered this issue on tabbed column page when a field is edited and left blank, as in the attached screenshot Salary column of third row is empty. But on our page we were encountering it randomly.
We applied the unsaved changes confirmation trick in preSubmit to avoid unnecessary server posts.
Thanks
So on this page to recreate, do I need to:
And it will fail? I'm still not sure on how I can recreate the issue. Can you give me the steps to do so please?
Allan
Hi allen,
I have created a short video clip to show the scenario. https://drive.google.com/file/d/1M4npk0NkPyZ_kbZW3lcGs_LC1zklREAo/view
Thank you - I see the issue now.
The problem is being caused by the fact that when the Salary column is empty it is set to
null
in the database. This is reflected in the JSON that is loaded from the server. However,null
cannot be represented in ainput
element, so Editor transforms thatnull
into an empty string - thus the value is different and it submits the data from that row.This thread has discussion on how Editor can better handle
null
values on the client-side. I'm afraid that at the moment there is no workaround for this.Allan