New, Edit and Delete buttons disappear with German language active

New, Edit and Delete buttons disappear with German language active

akradiakradi Posts: 1Questions: 1Answers: 0

When I configure an other language in the js file

var table = $('#Firma').DataTable( {
ajax: 'php/table.Firma.php',
[...]
"language": {
"url": "de.json"
} 
} );

the Buttons new, delete, update disappears. What must be configured additionally?

  • English: Everthing is perfect
    English: Everthing is perfect
  • German: The Buttons are invisible
    German: The Buttons are invisible

Thanks for a hint and your help.

Answers

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    Hi,

    You are using the language.url option which is causing the issue here. As its documentation notes:

    Note that when this parameter is set, DataTables' initialisation will be asynchronous due to the Ajax data load. That is to say that the table will not be drawn until the Ajax request has completed. As such, any actions that require the table to have completed its initialisation should be placed into the initComplete callback.

    Which is how to resolve the issue you are seeing here - initialise the Buttons inside the initComplete callback.

    Allan

This discussion has been closed.