Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
register events before datatable get initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce17 authored Aug 1, 2017
1 parent 3cc35ee commit 7a930ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Resources/views/datatable/datatable_js.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@
$.extend(defaults, initialSearch);
if (!$.fn.dataTable.isDataTable(selector)) {
$(selector)
{% include 'SgDatatablesBundle:datatable:events.html.twig' %}
;
oTable = $(selector)
.DataTable(defaults)
.on('draw.dt', function() { postCreateDatatable({{ sg_datatables_view.ajax.pipeline}}) })
{% include 'SgDatatablesBundle:datatable:events.html.twig' %}
;
{% if true == sg_datatables_view.options.individualFiltering %}
Expand Down

0 comments on commit 7a930ee

Please sign in to comment.