waldo2188 / DatatableBundle

Symfony2 Ajax Datatable Bundle to simplify the use of http://datatables.net/ (and Doctrine entity inside)
MIT License
17 stars 16 forks source link

Refresh Table Data After Multiple Select #30

Open dahomz opened 6 years ago

dahomz commented 6 years ago

When following the 'Multiple Actions how do I add a checkbox for each row?' example I experienced an issue where the datatable was not refreshing after the record had been updated in database.

Seems that the success function in multipleRaw.js.twig was not working for me.

 success: function(msg) {
                    $('#{{ id }}').trigger('dt.draw');
                },

It was replaced with;

success: function(msg) {
                    $('#{{ id }}').DataTable().ajax.reload(null, false );
                },

which solved it for me (and refreshed the table keeping the current pagination.