Change Button Position with div Container
Change Button Position with div Container

I use this to change the button Position: https://datatables.net/forums/discussion/66759/position-of-export-buttons
But as soon as I insert languages the buttons are no longer displayed at the new position
let table = $('.datatable').DataTable({
language: {
url: languages['{{ auth()->user()->locale }}']
},
......
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The
language.url
option is asynchronous meaning thetable
variable is not ready when this code is executed:Move it into
initComplete
and replacetable
withthis.api()
to look like this:Kevin
Great. Thank you Kevin