mardi 14 juin 2016

Appending Data w/ Bootstrap-table plugin

On page load, Symfony/Twig take care of providing/rendering the data initially shown in the table which bootstrap-table is applied on.

Users can click to get more records at which point I do:

$table = $("#reviewTable");
$table.bootstrapTable('append', data);

In this case data is structured as it is in this example: https://github.com/wenzhixin/bootstrap-table-examples/blob/master/methods/append.html BUT I am returning HTML for many of the cells. This sort of works but I lose the table-related styling on the appended rows. Things aren't centered or spaced correctly because that styling is done at the cell level.

I would prefer to use the AJAX capability that bootstrap-table has built in however I don't want to lose the power that Twig provides since I am using Symfony2 behind the scenes.

Any thoughts from those who have used this (or similar) plugins?

Aucun commentaire:

Enregistrer un commentaire