Closed laurentk6 closed 5 years ago
Hi,
You have to set a unique name per DataTable.
Check this file for a complete example.
The important line is: https://github.com/omines/datatables-bundle/blob/47261b3170804af8506eafc8ba40920141f121a9/tests/Fixtures/AppBundle/Controller/HomeController.php#L40
Thank you very much ! Works great !
Hello,
I'm trying to create two datatables with different data on the same route, but both tables are exactly the same (with the same data). Is there a function or trick to display two datatables with two different entities ?
Exemple :
` /**
@Route("/societe/{id}/edit", name="society_edit") */ public function form(Society $societe = null, ObjectManager $manager, Request $request){ $table_address = null; $table_contact = null;
}`
and datatabletypeInterface :
`class ContactTableType implements DataTableTypeInterface {
}`
`class AddressTableType implements DataTableTypeInterface {
}`
Thanks for help