omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
251 stars 113 forks source link

Get JS instance of datatable #303

Closed ArmandArthur closed 1 year ago

ArmandArthur commented 1 year ago

Hello,

Can you tell me how retrieve the instance of datatable in Javascript?

Thanks you

curry684 commented 1 year ago

It's actually in the docs: https://omines.github.io/datatables-bundle/#javascript

ArmandArthur commented 1 year ago

$("#id").DataTable()

curry684 commented 1 year ago

That will not work until the initialization is completed, which is why using the Promise is recommended practice.