Category: datatables

Symfony DataTables return database in ajax.text format

I’m using DataTables in my symfony project to render a table with database info like this: <tbody> {% for file in files %} <tr> <td>{{ file.name }}</td> <td>{{ file.primaryCat }}</td> <td>{{ file.secondaryCat }}</td> <td>{{ file.postedAt}}</td> <td>{{ file.tags }}</td> <td>{{ file.location…

How can I limit my database request according to the pagination of the datatable?

I am loading data from my database, which is a very high amount of data. To get a real fast performace, I limit the data (with my parts function) Controller.php $table = $this->em->getRepository($EntityName)->parts(10); $table_json = $serializer->serialize($table, ‘json’); $table_array = json_decode($table_json);…

DataTables / Bootstrap Modals not working on Firefox (Symfony 4 Project)

DataTable modal not working on Firefox This project has several bootstrap modals which are working fine on Chrome but not on Firefox. I’ve managed to find a solution which does make them work, but can’t use it because it causes…