Using language without triggering draw.dt event
Using language without triggering draw.dt event
Hi, I have the following problem:
I have a table with forms inside, that I fill manually once the ajax request succeeds. As when changing pages or row number makes new form inputs, I have to fill them with the previous data on a draw.dt event too.
I have to maintain 2 languages (english and japanese), so when jp page loads, I add the language request to datatable properties. The problem is that on the japanese page, after language json arrives, it triggers a draw.dt event too, but since data is not ready yet it throws an error.
Is there a way to prevent using another language to trigger a dt.draw event?
Thanks.
Replies
Try adding your
drawevent inside ainitevent. That will delay the listening of the draw until after the table is fully initialised (and the language loaded).Allan